Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 9, 2025

McpClientTool was unconditionally setting Strict = false in AdditionalProperties for all tools, which shouldn't be a blanket default.

Changes

  • Remove the s_additionalProperties static field and AdditionalProperties override
  • Remove unused System.Collections.ObjectModel import

The class now inherits the default AdditionalProperties behavior from AIFunction.

Original prompt

On McpClientTool.cs:29-34, Remove this s_additionalProperties and any reference to it. We shouldn't be setting this Strict property on every McpClientTool.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Remove s_additionalProperties and related references Remove s_additionalProperties from McpClientTool Dec 9, 2025
Copilot AI requested a review from stephentoub December 9, 2025 19:49
@stephentoub stephentoub marked this pull request as ready for review December 9, 2025 19:55
@stephentoub stephentoub enabled auto-merge (squash) December 9, 2025 19:55
@PederHP
Copy link
Member

PederHP commented Dec 9, 2025

Ah! Now it all makes sense with the bug I encountered with the beta anthropic client. I assume this was introduced because of another API where this default is preferable with strict mode?

@stephentoub stephentoub merged commit 20d726b into main Dec 10, 2025
10 checks passed
@stephentoub stephentoub deleted the copilot/remove-s-additional-properties branch December 10, 2025 13:53
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.

4 participants