Skip to content

functionDeclarationToAnthropicTool ignores parametersJsonSchema, resulting in empty inputSchema for Claude MCP Tools #629

@Cato-Wen

Description

@Cato-Wen

When using MCP tools with the Claude model via the Google AI Java SDK, the method functionDeclarationToAnthropicTool fails to populate the tool's inputSchema. As a result, the generated Tool object always contains an empty properties map, even though the FunctionDeclaration object includes valid parameter schema data.

This effectively makes MCP tools unusable with Claude because no input schema is delivered to the model.

Actual Behavior

  • parameters() is empty → the method skips schema processing
  • parametersJsonSchema() contains the real schema but is ignored
  • The resulting Tool has an empty inputSchema.properties map
  • Claude receives a tool with no arguments → tools cannot be invoked properly
Image Image

Metadata

Metadata

Assignees

Labels

waiting on reporterWaiting for reaction by reporter. Failing that, maintainers will eventually closed it as stale.

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions