Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 12, 2026

Address Review Feedback - All Comments Resolved ✅

All new review comments have been addressed:

Documentation Changes

  1. FunctionApprovalRequestContent - Reverted parameter documentation from "requires user approval" back to "requires approval"
  2. FunctionApprovalResponseContent - Reverted parameter documentation from "requires user approval" back to "for which approval was requested"
  3. ✅ Reverted CreateResponse documentation from "function call" back to "call"

Constructor Changes

  1. McpServerToolCallContent - Removed arguments: null parameter from base constructor call

JSON Serialization Changes

  1. ✅ Changed all deserializations from IReadOnlyDictionaryStringObject to IDictionaryStringObject:

    • Line 212: McpToolCallApprovalRequestItem deserialization
    • Line 426: McpToolCallApprovalRequestItem streaming deserialization
    • Line 1298: AddMcpToolCallContent deserialization
  2. ✅ Changed all serializations to use IDictionaryStringObject:

    • Line 1083: McpServerToolCallContent Arguments serialization
    • Line 1096: FunctionCallContent Arguments serialization (changed from AIJsonUtilities to OpenAIJsonContext)

FunctionInvokingChatClient Changes

  1. ✅ Reverted error message from "CallId(s)" back to "FunctionCall.CallId(s)"
  2. ✅ Simplified ApprovalResultWithRequestMessage struct - removed XML doc comment since we're using concrete FunctionCallContent type

All changes maintain the breaking changes we accepted (using IDictionary instead of IReadOnlyDictionary) while simplifying the code.

Original prompt

Can you take over #7104, augment it with implementing McpServerToolCallContent and McpServerToolResultContent by unsealing and extending FunctionCallContent and FunctionResultContent, add the necessary compatibility suppressions, update the branch and resolve conflicts.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Microsoft Reviewers: Open in CodeFlow

Copilot AI changed the title [WIP] Implement McpServerToolCallContent and McpServerToolResultContent Unseal FunctionCallContent/FunctionResultContent; make MCP types extend them Jan 12, 2026
Copilot AI requested a review from jozkee January 12, 2026 19:39
jozkee
jozkee previously requested changes Jan 12, 2026
Copy link
Member

@jozkee jozkee left a comment

Choose a reason for hiding this comment

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

@copilot please fix errors and address feedback.

@dotnet-policy-service dotnet-policy-service bot added the waiting-author-feedback 📭 The author of this issue needs to respond in order for us to continue investigating this issue. label Jan 12, 2026
…nts properties, fix idToContentMapping

Co-authored-by: jozkee <[email protected]>
@dotnet-policy-service dotnet-policy-service bot removed the waiting-author-feedback 📭 The author of this issue needs to respond in order for us to continue investigating this issue. label Jan 12, 2026
Copy link
Contributor Author

Copilot AI commented Jan 12, 2026

@copilot please fix errors and address feedback.

All feedback addressed in commits 598f78b, 23d5d20, and 29454f9. Changes include:

  • Reverted to FunctionCallContent FunctionCall in approval types
  • Removed wrapper properties from MCP types (breaking changes accepted)
  • Fixed idToContentMapping type and simplified logic
  • Added missing tests from PR Replace Mcp approvals with Function approvals #7104
  • Fixed all build errors (unused usings, type conversions, property renames)

Copilot AI requested a review from jozkee January 12, 2026 22:19
Copilot AI requested a review from jozkee January 14, 2026 18:08
@jozkee jozkee force-pushed the copilot/augment-mcp-server-tool-content branch from d3a7a8f to 0f47aa5 Compare January 14, 2026 22:25
Undo unneeded changes
Updated OpenAIResponsesChatClient
Updated tests
@jozkee jozkee force-pushed the copilot/augment-mcp-server-tool-content branch from 0f47aa5 to 17daa5c Compare January 14, 2026 23:38
@jozkee jozkee marked this pull request as ready for review January 15, 2026 02:22
Copilot AI review requested due to automatic review settings January 15, 2026 02:22
@jozkee jozkee requested a review from a team as a code owner January 15, 2026 02:22
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors the MCP (Model Context Protocol) approval types to use a unified approval mechanism by extending the existing FunctionCallContent and FunctionResultContent base types instead of having separate MCP-specific approval types.

Changes:

  • Unsealed FunctionCallContent and FunctionResultContent to allow inheritance
  • Made McpServerToolCallContent and McpServerToolResultContent extend the unsealed base types
  • Removed McpServerToolApprovalRequestContent and McpServerToolApprovalResponseContent, using the unified FunctionApprovalRequestContent/FunctionApprovalResponseContent instead
  • Changed Arguments from IReadOnlyDictionary<string, object?> to IDictionary<string, object?> for mutability
  • Renamed Output property to Result in McpServerToolResultContent to align with base class

Reviewed changes

Copilot reviewed 24 out of 24 changed files in this pull request and generated no comments.

Show a summary per file
File Description
FunctionCallContent.cs Unsealed class to allow inheritance
FunctionResultContent.cs Unsealed class to allow inheritance
McpServerToolCallContent.cs Now extends FunctionCallContent, exposing ToolName as alias for Name
McpServerToolResultContent.cs Now extends FunctionResultContent
McpServerToolApprovalRequestContent.cs Deleted - replaced by FunctionApprovalRequestContent
McpServerToolApprovalResponseContent.cs Deleted - replaced by FunctionApprovalResponseContent
FunctionInvokingChatClient.cs Added pattern matching to exclude McpServerToolCallContent from local approval processing; fixed spelling error
OpenAIResponsesChatClient.cs Updated to use unified approval types; adjusted serialization for IDictionary
CompatibilitySuppressions.xml Added suppressions for breaking changes
Test files Updated tests to use unified approval types; added comprehensive mixed-scenario tests

@jozkee jozkee requested a review from stephentoub January 15, 2026 03:48
@stephentoub
Copy link
Member

I'm unclear how this is intended to work.

If a service sends an MCP call content, how does the client know it's not supposed to try to invoke something for it? Is this based on the premise that an FCC has an InvocationRequired property? Or is it based on the premise that FCCs that come with a paired FRC are implicitly considered not requiring invocation, in which case case what happens if the server sends the MCP call in one response and either doesn't have result content or sends it in a separate response?

Also, the FICC is being modified here to explicitly rule out some FCC-derived types. It doesn't scale for FICC to have to know about every FCC-derived type that should be ignored.

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.

3 participants