Interface McpCompletionHandler
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Application-owned argument completer for a prompt or resource URI template.
The handler must authorize every suggestion it returns for the admitted request identity. Context arguments and partial values are untrusted input. Implementations must be safe for concurrent invocation.
- Author:
- Mark Allen
-
Method Summary
Modifier and TypeMethodDescriptionhandle(@NonNull McpRequestContext requestContext, @NonNull McpCompletionContext completionContext, @NonNull McpInvocationFeatures invocationFeatures) Supplies ordered suggestions for one partial argument value.
-
Method Details
-
handle
@NonNull McpArgumentCompletionResult handle(@NonNull McpRequestContext requestContext, @NonNull McpCompletionContext completionContext, @NonNull McpInvocationFeatures invocationFeatures) throws Exception Supplies ordered suggestions for one partial argument value.- Parameters:
requestContext- admitted request metadatacompletionContext- partial argument and canonical registrationinvocationFeatures- invocation-scoped optional features- Returns:
- non-null suggestions result
- Throws:
Exception- if application handling fails
-