Skip to content

Method not found: 'System.String Microsoft.Extensions.AI.HostedMcpServerTool.get_AuthorizationToken() #1556

@egenita

Description

@egenita

Describe the bug
Error encountered when going though to the QuickstartClient sample project
Unhandled exception. System.MissingMethodException: Method not found: 'System.String Microsoft.Extensions.AI.HostedMcpServerTool.get_AuthorizationToken()'

To Reproduce
Steps to reproduce the behavior:

  1. Copy and run the QuickstartClient sample project

Expected behavior
Sample project should run as expected and not throwing the MissingMethodException.

Logs
Unhandled exception. System.MissingMethodException: Method not found: 'System.String Microsoft.Extensions.AI.HostedMcpServerTool.get_AuthorizationToken()'.
at Anthropic.SDK.Messaging.ChatClientHelper.CreateMessageParameters(IChatClient client, IEnumerable1 messages, ChatOptions options) at Anthropic.SDK.Messaging.MessagesEndpoint.Microsoft.Extensions.AI.IChatClient.GetStreamingResponseAsync(IEnumerable1 messages, ChatOptions options, CancellationToken cancellationToken)+MoveNext()
at Anthropic.SDK.Messaging.MessagesEndpoint.Microsoft.Extensions.AI.IChatClient.GetStreamingResponseAsync(IEnumerable1 messages, ChatOptions options, CancellationToken cancellationToken)+System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult() at Microsoft.Extensions.AI.FunctionInvokingChatClient.GetStreamingResponseAsync(IEnumerable1 messages, ChatOptions options, CancellationToken cancellationToken)+MoveNext()
at Microsoft.Extensions.AI.FunctionInvokingChatClient.GetStreamingResponseAsync(IEnumerable1 messages, ChatOptions options, CancellationToken cancellationToken)+MoveNext() at Microsoft.Extensions.AI.FunctionInvokingChatClient.GetStreamingResponseAsync(IEnumerable1 messages, ChatOptions options, CancellationToken cancellationToken)+System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult()
at Program.

$(String[] args) in /Users/egenita/Dev/AI/QuickstartClient/Program.cs:line 77
at Program.$(String[] args) in /Users/egenita/Dev/AI/QuickstartClient/Program.cs:line 77
at Program.$(String[] args) in /Users/egenita/Dev/AI/QuickstartClient/Program.cs:line 89
at Program.(String[] args)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions