Annotation Interface McpTool
Soklet's annotation processor derives the input schema from parameters
annotated with McpToolArgument. For an ordinary typed-completion
method, it derives the output schema from the declared return type. A method
returning McpTaskCreatedResult is statically task-only and
derives its eventual output schema from the result's type argument; Soklet
rejects a client without the Tasks capability before invoking it. Other
methods returning McpOperationResult or a subtype use the
dynamic advanced-result path and have no derived output schema.
McpToolProperty customizes property metadata on ordinary typed input
and output records.
A statically task-only method may accept one unannotated
McpTaskCreationContext parameter directly. The same context remains
available through McpInvocationFeatures for dynamic
handlers. A task-control parameter must not be annotated with
McpToolArgument.
- Author:
- Mark Allen
-
Required Element Summary
Required ElementsModifier and TypeRequired ElementDescriptionThe tool name published to MCP clients.Exact MCP revisions on which this tool is available. -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionThe optional human-readable tool description.Client requests this tool may emit during multi-round-trip handling.Names a server-registered rate limiter for this tool.The request-state contract for this tool.booleanWhether Soklet mirrors structured tool output into a text content block.The optional human-readable tool title.
-
Element Details
-
protocolVersions
Exact MCP revisions on which this tool is available. At least one is required, and every revision must be exposed by the owning endpoint.- Returns:
- supported protocol revisions
-
name
-
title
-
description
The optional human-readable tool description.- Returns:
- the description, or an empty string if none is configured
- Default:
""
-
rateLimiterName
Names a server-registered rate limiter for this tool.An empty value inherits the endpoint or server tool rate limiter. A nonempty value must identify an entry in the server's rate-limiter registry.
- Returns:
- the rate-limiter name, or an empty string to inherit
- Default:
""
-
structuredContentMirroredAsText
boolean structuredContentMirroredAsTextWhether Soklet mirrors structured tool output into a text content block.- Returns:
trueto mirror structured content as text
- Default:
true
-
mayRequestInput
Client requests this tool may emit during multi-round-trip handling.A nonempty declaration requires the method to return
McpOperationResultor a subtype.- Returns:
- input-request declarations
- Default:
{}
-
requestStateMode
The request-state contract for this tool.A mode other than
McpRequestStateMode.NONErequires the method to returnMcpOperationResultor a subtype.- Returns:
- request-state mode
- Default:
NONE
-