[BUG] claude mcp serve tools not displayed in MCP clients due to missing type field in outputSchema

Resolved 💬 4 comments Opened Feb 25, 2026 by nicolas-girod Closed Mar 26, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

The MCP server's SendMessage tool (index 20) has an invalid inputSchema that uses anyOf at the root level without a type: "object" property. This causes MCP clients to fail when calling tools/list.

MCP client is Kilo CLI 1.0.23

Error from MCP client:

{
  "code": "invalid_value",
  "values": ["object"],
  "path": ["tools", 20, "inputSchema", "type"],
  "message": "Invalid input: expected \"object\""
}

Problematic schema returned by claude mcp serve:

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "anyOf": [
    {
      "type": "object",
      "properties": {
        "type": { "type": "string", "const": "message" },
        "recipient": { "type": "string" },
        "content": { "type": "string" },
        "summary": { "type": "string" }
      },
      "required": ["type", "recipient", "content", "summary"],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "type": { "type": "string", "const": "broadcast" },
        "content": { "type": "string" },
        "summary": { "type": "string" }
      },
      ...
    }
  ]
}

The MCP specification requires inputSchema.type to be "object" at the root level.

What Should Happen?

The SendMessage tools inputSchema should have type: "object" at the root level, with anyOf nested within, or restructured to comply with MCP tool schema requirements.

Error Messages/Logs

ERROR service=mcp key=claude-code error=[
  {
    "code": "invalid_value",
    "values": ["object"],
    "path": ["tools", 20, "inputSchema", "type"],
    "message": "Invalid input: expected \"object\""
  }
] failed to get tools from client

Steps to Reproduce

  1. Configure Claude Code as an MCP server:
{
  "claude-code": {
    "type": "local",
    "command": ["/path/to/claude", "mcp", "serve"],
    "environment": {
      "CLAUDE_CODE_USE_VERTEX": "1",
      "CLOUD_ML_REGION": "europe-west1",
      "ANTHROPIC_VERTEX_PROJECT_ID": "your-project-id"
    }
  }
}
  1. Connect an MCP client that validates tool schemas (e.g., Kilo, MCP Inspector)
  2. Observe tools/list fails with schema validation error

Verification:

echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}
{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}' | claude mcp serve | python3 -c "
import json, sys
for line in sys.stdin:
    obj = json.loads(line)
    if 'result' in obj and 'tools' in obj['result']:
        for i, tool in enumerate(obj['result']['tools']):
            schema = tool.get('inputSchema', {})
            if schema.get('type') != 'object':
                print(f'Tool {i}: {tool[\"name\"]} - inputSchema.type = {schema.get(\"type\")}')"

Output: Tool 20: SendMessage - inputSchema.type = None

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

2.0.33 (per #8014)

Claude Code Version

2.1.52

Platform

Google Vertex AI

Operating System

Ubuntu/Debian Linux

Terminal/Shell

zsh

Additional Information

Related issue: #8014 - This was fixed in 2.0.33 by @domdomegg but has regressed in 2.1.52.
Related issue: #10031 - Similar error but was closed as duplicate of #8014

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗