Skip to content

fix(mcp): preserve server additionalProperties in convertTool#33327

Open
MeloMei wants to merge 1 commit into
anomalyco:devfrom
MeloMei:mcp-additional-properties
Open

fix(mcp): preserve server additionalProperties in convertTool#33327
MeloMei wants to merge 1 commit into
anomalyco:devfrom
MeloMei:mcp-additional-properties

Conversation

@MeloMei

@MeloMei MeloMei commented Jun 22, 2026

Copy link
Copy Markdown

Issue for this PR

Closes #33322

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

In catalog.ts convertTool, additionalProperties is hardcoded to false after spreading the MCP server's input schema. This discards whatever the server declared — breaking tools that use additionalProperties: true or an object sub-schema.

The fix preserves the server's original value and only defaults to false when the server omits it:

- additionalProperties: false,
+ additionalProperties: (mcpTool.inputSchema as JSONSchema7).additionalProperties ?? false,

How did you verify your code works?

Added unit tests in test/mcp/catalog.test.ts covering all four cases: server omits additionalProperties (defaults to false), server sets true, server sets an object sub-schema, and server explicitly sets false. All 64 MCP tests pass.

Screenshots / recordings

N/A — no UI changes.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Copilot AI review requested due to automatic review settings June 22, 2026 09:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(mcp): additionalProperties hardcoded to false in catalog.ts convertTool

2 participants