Skip to content

Conversation

@stephentoub
Copy link
Member

@stephentoub stephentoub commented Jan 14, 2026

What does this PR do?

Updates ModelContextProtocol dependency to 0.6.0-preview.1. Also bump Microsoft.Extensions.* to latest.

Also bump Microsoft.Extensions.* to latest.
Copilot AI review requested due to automatic review settings January 14, 2026 03:07
@stephentoub stephentoub enabled auto-merge (squash) January 14, 2026 03:11
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 updates the ModelContextProtocol dependency from 0.4.0-preview.3 to 0.6.0-preview.1 (note: PR description mentions 0.5.0-preview.1 but actual version is 0.6.0-preview.1) and updates several Microsoft.Extensions.* packages from version 10.0.1 to 10.0.2. The changes adapt the codebase to breaking API changes in the ModelContextProtocol library.

Changes:

  • Updated ModelContextProtocol and ModelContextProtocol.AspNetCore packages to 0.6.0-preview.1
  • Updated Microsoft.Extensions.* packages (AI, Caching, Configuration, DependencyInjection, Hosting) to their latest versions (10.0.2 or 10.2.0)
  • Updated System.* packages to version 10.0.2
  • Adapted code to API changes: IReadOnlyDictionaryIDictionary for tool arguments, Content property now a collection, added required MaxTokens property, and renamed SetLoggingLevelSetLoggingLevelAsync

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
Directory.Packages.props Updated ModelContextProtocol packages to 0.6.0-preview.1 and bumped Microsoft.Extensions.* and System.* packages to latest versions; reorganized Microsoft.CognitiveServices.Speech package location
core/Azure.Mcp.Core/src/Commands/CommandExtensions.cs Changed parameter type from IReadOnlyDictionary<string, JsonElement> to IDictionary<string, JsonElement> to match updated ModelContextProtocol API
core/Azure.Mcp.Core/src/Areas/Server/Commands/ToolLoading/BaseToolLoader.cs Updated to use IDictionary instead of IReadOnlyDictionary for tool arguments
core/Azure.Mcp.Core/src/Areas/Server/Commands/ToolLoading/RegistryToolLoader.cs Changed TransformArgumentsToDictionary method signature to accept IDictionary instead of IReadOnlyDictionary
core/Azure.Mcp.Core/src/Areas/Server/Commands/ToolLoading/NamespaceToolLoader.cs Updated method signatures, added MaxTokens property to sampling requests, changed Content to collection syntax, updated content access pattern, and added named cancellationToken parameter
core/Azure.Mcp.Core/src/Areas/Server/Commands/ToolLoading/ServerToolLoader.cs Applied same API updates as NamespaceToolLoader: collection-based Content, MaxTokens addition, and updated content access pattern
core/Azure.Mcp.Core/src/Areas/Server/Commands/ToolLoading/SingleProxyToolLoader.cs Applied consistent API updates including collection-based Content, MaxTokens property, and updated sampling response handling
core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/*.cs Updated test helper methods to use IDictionary instead of IReadOnlyDictionary for consistency with production code
core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/BaseToolLoaderTests.cs Updated test to use collection syntax for Content property and added required MaxTokens field
core/Azure.Mcp.Core/tests/Azure.Mcp.Core.LiveTests/ClientToolTests.cs Renamed method call from SetLoggingLevel to SetLoggingLevelAsync to match updated API
core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/Runtime/McpRuntimeTests.cs Updated test helper method signature to use IDictionary instead of IReadOnlyDictionary

@github-project-automation github-project-automation bot moved this from Untriaged to In Progress in Azure MCP Server Jan 14, 2026
@stephentoub stephentoub merged commit 4539da3 into microsoft:main Jan 14, 2026
27 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Azure MCP Server Jan 14, 2026
@stephentoub stephentoub deleted the update051 branch January 14, 2026 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[Bug] Azure MCP Server missing required maxTokens field in sampling/createMessage requests

2 participants