inputSchema has type "object" at the root
Tool arguments are always one JSON object, so inputSchema needs "type": "object" at its root with the arguments under "properties"; without it the Claude API answers "input_schema.type: Field required".
Check spec-input-schema-root-object · MCP specification 2026-07-28 · default severity: blocking · rubric 2.1.0
Error message you’ll see
tools.0.custom.input_schema.type: Field requiredClaude API (400), when the root has no "type": "object". Where this was reported
Invalid schema for function 'mcp__codex_app__automation_update': schema must have type 'object' and not have 'oneOf'/'anyOf'/'allOf'/'enum'/'const'/'not' at the top level.OpenAI API, when a client forwards the tool as a function. Where this was reported
What fails
Tool arguments are always one JSON object. A schema whose root is not type "object" does not match the protocol type and clients may reject the tool.
The rule
Tool arguments are always JSON objects, so
type: "object"is required at the root.
How to fix it
Set "type": "object" at the root of inputSchema and declare arguments under "properties".
- Add "type": "object" at the root of inputSchema.
- Declare each argument under "properties", and list mandatory ones in "required".
- Do not use a bare array, string or composed schema as the root.
"inputSchema": { "properties": { "id": { "type": "string" } } }"inputSchema": { "type": "object", "properties": { "id": { "type": "string" } } }TypeScript SDK
import { McpServer } from '@modelcontextprotocol/server';
import * as z from 'zod';
const server = new McpServer({ name: 'issues', version: '1.0.0' });
server.registerTool(
'get_issue',
{
title: 'Get issue',
description: 'Return one issue by ID. Use when the user names an issue.',
inputSchema: z.strictObject({
issue_id: z.string().describe('Issue ID, for example ISS-42'),
}),
annotations: { readOnlyHint: true, destructiveHint: false, openWorldHint: false },
},
async ({ issue_id }) => ({ content: [{ type: 'text', text: 'Done' }] }),
);Python SDK
from typing import Annotated
from pydantic import Field
from mcp.server.mcpserver import MCPServer
from mcp.types import ToolAnnotations
server = MCPServer("issues")
@server.tool(
title="Get issue",
annotations=ToolAnnotations(readOnlyHint=True, destructiveHint=False, openWorldHint=False),
)
def get_issue(
issue_id: Annotated[str, Field(description="Issue ID, for example ISS-42")],
) -> str:
"""Return one issue by ID. Use when the user names an issue."""
return "Done"Run against @modelcontextprotocol/server 2.4.0, mcp 2.3.0 and fastmcp 4.2.2 on 2026-11-18; the checker confirms this check passes on the tool list each snippet produces.
Questions
Can a tool take an array as its arguments?
Not directly. Wrap it in an object: {"type": "object", "properties": {"items": {"type": "array", "items": {...}}}}.
Why does a server that works in one client fail in another?
Some clients pass schemas through without checking; the model API behind another client checks the root type and refuses the request.
Related checks
- inputSchema is present
- Composition branches carry presence rules, not types
- inputSchema and outputSchema are valid JSON Schema
- All checks in MCP tool input and output schemas
How this check is graded
It counts toward: MCP specification 2026-07-28. See the rubric.
Last verified against MCP schema.ts, revision 2026-07-28 on 2026-11-18. The rule above is quoted in the source’s own words. This page as Markdown.
Check your tool list: paste your tools/list, nothing is sent anywhere