# 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. Last verified against MCP schema.ts, revision 2026-07-28 on 2026-11-18.

## Error message you’ll see

```text
tools.0.custom.input_schema.type: Field required
```

Claude API (400), when the root has no "type": "object". Where this was reported: https://github.com/langchain-ai/langchainjs/issues/11240

```text
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: https://github.com/Wei-Shaw/sub2api/issues/7915

## 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.

Source: [MCP schema.ts, revision 2026-07-28](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/main/schema/2026-07-28/schema.ts)

## How to fix it

Set "type": "object" at the root of inputSchema and declare arguments under "properties".

1. Add "type": "object" at the root of inputSchema.
2. Declare each argument under "properties", and list mandatory ones in "required".
3. Do not use a bare array, string or composed schema as the root.

Before:

```json
"inputSchema": { "properties": { "id": { "type": "string" } } }
```

After:

```json
"inputSchema": { "type": "object", "properties": { "id": { "type": "string" } } }
```

### TypeScript SDK

```ts
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

```python
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"
```

## 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](https://isokron.ai/mcp-check/checks/spec-input-schema-missing)
- [Composition branches carry presence rules, not types](https://isokron.ai/mcp-check/checks/schema-oneof-branch-types)
- [inputSchema and outputSchema are valid JSON Schema](https://isokron.ai/mcp-check/checks/spec-schema-valid)
- [MCP tool input and output schemas](https://isokron.ai/mcp-check/checks/schema)

Counts toward: MCP specification 2026-07-28.

Rubric: https://isokron.ai/mcp-check/rubric

Check your tool list: https://isokron.ai/mcp-check
