Skip to content

[HELP WANTED] Bug: MCP Server schema validation error with Gemini CLI #143

Description

@raphael-intugle

name: Help Wanted
about: Request community help on a specific task or feature
title: '[HELP WANTED] Bug: MCP Server schema validation error with Gemini CLI'
labels: 'help wanted', 'bug'
assignees: ''

What We Need Help With

We need help investigating and fixing a schema validation error that occurs when connecting the Intugle MCP server (intugle-mcp) to the Gemini CLI. The error indicates a mismatch in the expected type for additionalProperties in the tool's output schema.

Background & Context

The Model Context Protocol (MCP) server allows AI agents to interact with Intugle's semantic layer. However, when users try to connect the intugle-mcp server to the Gemini CLI, the connection fails during tool discovery due to a JSON schema validation error.

Current State

When the Gemini CLI attempts to discover tools from the Intugle MCP server, it throws the following error:

Error discovering tools from semantic_model: [
    {
      "code": "invalid_type",
      "expected": "boolean",
      "received": "object",
      "path": [
        "tools",
        1,
        "outputSchema",
        "additionalProperties"
      ],
      "message": "Expected boolean, received object"
    }
]

This suggests that for one of the tools (specifically the second one, index 1), the outputSchema defines additionalProperties as an object, but the consumer (Gemini CLI) expects a boolean.

Desired Outcome

The intugle-mcp server should successfully connect to the Gemini CLI without throwing schema validation errors. The tool definitions should generate schemas that are compatible with the strict validation expected by the client.

Scope of Work

  • Reproduce the issue using the steps provided below.
  • Identify which specific tool in the MCP server implementation is causing the schema issue.
  • Modify the Pydantic model or schema generation logic to ensure additionalProperties is handled correctly (likely by setting it to False or removing it if not needed, or ensuring the client can handle it).
  • Verify the fix by successfully connecting to the Gemini CLI.

Technical Details

Relevant Files/Modules

  • src/intugle/mcp/ (Likely contains the server implementation and tool definitions)
  • src/intugle/mcp/server.py (or similar entry point)

Key Concepts/Technologies

  • Model Context Protocol (MCP)
  • Pydantic: Used for defining data models and generating JSON schemas.
  • JSON Schema: Understanding additionalProperties behavior.

Related Documentation

Steps to Reproduce

  1. Install the library:
    pip install intugle
  2. Start the MCP server:
    intugle-mcp
  3. Configure the Gemini CLI (or create a .gemini/settings.json) with the following server configuration:
    "mcpServers": {
      "semantic_model": {
        "httpUrl": "http://localhost:8080/semantic_layer/mcp",
        "trust": true
      }
    }
  4. Start the Gemini CLI. The error should appear immediately upon initialization.

Suggested Approach

  1. Inspect the src/intugle/mcp/ directory to find where tools are defined.
  2. Look for Pydantic models used as return types for the tools.
  3. Check if any model config has extra = 'allow' or similar settings that might generate an object for additionalProperties.

Skills Needed

  • Python development
  • Machine Learning (XGBoost, scikit-learn)
  • LLM/GenAI integration (LangChain, OpenAI)
  • Data engineering
  • SQL and database knowledge
  • Vector databases (Qdrant)
  • Databricks/Snowflake experience
  • Frontend/UI (Streamlit)
  • Documentation writing
  • Testing (pytest)
  • Other: Pydantic, JSON Schema

Getting Started

  1. Fork the repository
  2. Set up your development environment (see CONTRIBUTING.md)
  3. Reproduce the error locally.
  4. Apply the fix in the Pydantic models or server configuration.

Testing Requirements

  • Manual testing: Verify the error is gone when restarting the Gemini CLI.
  • Unit tests: Ensure the generated schema for the tools is valid.

Questions & Support

  • Ask questions in the comments below
  • Join our Discord for real-time help

We appreciate your interest in contributing to Intugle! 🙏

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions