Method GetPromptAsync
GetPromptAsync(string, IReadOnlyDictionary<string, string>, McpRequestContext, CancellationToken)
Expands a prompt into the messages the client should send.
Task<McpPromptResult> GetPromptAsync(string name, IReadOnlyDictionary<string, string> arguments, McpRequestContext context, CancellationToken cancellationToken = default)
Parameters
namestringThe prompt name.
argumentsIReadOnlyDictionary<string, string>Argument values supplied by the user, keyed by argument name.
contextMcpRequestContextSession and caller identity.
cancellationTokenCancellationTokenA token to observe while expanding.
Returns
- Task<McpPromptResult>
The expansion, or
nullwhen this provider does not own the name, which lets the server try the next registered provider.