Annotation Interface McpResourceCompletion
This annotation is used to identify methods that can handle completion requests for specific resources in the Model Context Protocol (MCP) server. When applied to a method, it indicates that the method can provide auto-completion suggestions for the specified resource URI.
Methods annotated with @McpResourceCompletion must:
- Return
McpCompleteCompletion - Accept exactly one parameter of type
McpSchema.CompleteRequest.CompleteArgument - Be properly configured with a resource URI
The annotation is retained at runtime and can only be applied to methods. Resource completion is typically used to provide suggestions for resource identifiers, file paths, or other resource-specific parameters.
- Author:
- codeboyzhou
-
Required Element Summary
Required Elements
-
Element Details
-
uri
String uriSpecifies the URI of the resource for which completion is provided.This value must match the URI of an existing resource that has been registered with the MCP server. The completion method will be invoked when completion requests are made for this specific resource.
The URI string must be non-null and non-empty. It should uniquely identify the resource within the MCP server context.
- Returns:
- the URI of the resource for which completion is provided
-