Method GetPromptCompletionsAsync
GetPromptCompletionsAsync(string, string, string, IDictionary<string, object>, CancellationToken)
Gets argument completion suggestions for a prompt.
public Task<McpCompletionResult> GetPromptCompletionsAsync(string promptName, string argumentName, string argumentValue, IDictionary<string, object> context = null, CancellationToken cancellationToken = default)
Parameters
promptNamestringThe name of the prompt to get completions for.
argumentNamestringThe name of the argument being completed.
argumentValuestringThe current partial value of the argument.
contextIDictionary<string, object>Optional dictionary of other argument values for context.
cancellationTokenCancellationTokenA token to cancel the operation.
Returns
- Task<McpCompletionResult>
The completion result containing suggestions.
Exceptions
- ObjectDisposedException
Thrown if the client has been disposed.
- InvalidOperationException
Thrown if the server does not support completions.