Method CompleteAsync
CompleteAsync(string, string, string, string, McpRequestContext, CancellationToken)
Suggests values for one argument.
Task<McpCompletionResult> CompleteAsync(string referenceType, string referenceName, string argumentName, string argumentValue, McpRequestContext context, CancellationToken cancellationToken = default)
Parameters
referenceTypestringWhat the argument belongs to:
ref/promptorref/resource.referenceNamestringThe prompt name or resource URI template it belongs to.
argumentNamestringThe argument being completed.
argumentValuestringWhat the user has typed so far. May be empty.
contextMcpRequestContextSession and caller identity, used to scope suggestions.
cancellationTokenCancellationTokenA token to observe while gathering suggestions.
Returns
- Task<McpCompletionResult>
The suggestions, or
nullwhen this provider has nothing to say about the argument, which lets the server try the next registered provider.