Skip to content

add_issue_comment's top-level anyOf (added in v1.10.0 / #3085) breaks Claude tool-use API compatibility #3126

Description

@takasek

What's Wrong?

add_issue_comment's inputSchema gained a top-level anyOf in v1.10.0 (introduced by #3085, fixing #3048):

"inputSchema": {
  "anyOf": [
    { "required": ["body"] },
    { "required": ["reaction"] }
  ],
  "dependentSchemas": { ... },
  "properties": { ... },
  "required": ["owner", "repo", "issue_number"],
  "type": "object"
}

Anthropic's Claude tool-use API rejects any custom tool whose input_schema uses oneOf/allOf/anyOf at the top level:

API Error: 400 tools.N.custom.input_schema: input_schema does not support oneOf, allOf, or anyOf at the top level

Since MCP clients typically send the entire tool list in one request, this single non-conformant schema causes the whole request to fail with a 400 — even if add_issue_comment itself is never invoked in that turn.

Who hits this

Clients that eagerly forward the full MCP tool list to the Claude Messages API without sanitizing schemas first. Concretely:

Interactive Claude Code sessions are generally unaffected because they defer full tool-schema loading via Tool Search (see anthropics/claude-code#64113 and #63436), but that mitigation does not apply to headless/CI/subagent invocations, so this is a real-world breaking regression for anyone running Claude-based automation against this server.

Suggested fix

Other tools in this same release already express "at least one of A or B" without a top-level combinator, by nesting under properties/dependentSchemas instead (e.g. issue_write, projects_write, update_issue_assignees, update_issue_labels, update_issue_type). Could add_issue_comment's validation be restructured the same way?

Version

v1.10.0 (regression from v1.9.0 — introduced by #3085). The change is on main, so the latest main is affected as well.

Related

Client-side (Claude Code) issues describing the same 400 mechanism and proposing schema sanitization before forwarding:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions