Class McpToolSpec
java.lang.Object
org.apache.juneau.rest.server.mcp.McpToolSpec
Revision-neutral tool descriptor returned from
tools/list.
Supersedes the wire-level Tool bean. outputSchema is revision-neutral: structured
tool output was introduced in 2025-06-18, and adapters narrow its schema shape for earlier
revisions. Deliberately absent: title, which is specific to later MCP revisions and belongs
on the revision-typed side of the adapter boundary.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe human-readable tool description.The tool's argument schema.getName()The tool name, used to routetools/callrequests.The tool's structured result schema.setDescription(String value) Sets the tool description.setInputSchema(McpSchema value) Sets the tool's argument schema.Sets the tool name.setOutputSchema(McpSchema value) Sets the tool's structured result schema.
-
Constructor Details
-
McpToolSpec
public McpToolSpec()
-
-
Method Details
-
getName
The tool name, used to routetools/callrequests.- Returns:
- The name, or
null if not set.
-
setName
Sets the tool name.- Parameters:
value- The new value. Can benull to unset the property.- Returns:
- This object.
-
getDescription
The human-readable tool description.- Returns:
- The description, or
null if not set.
-
setDescription
Sets the tool description.- Parameters:
value- The new value. Can benull to unset the property.- Returns:
- This object.
-
getInputSchema
The tool's argument schema.- Returns:
- The schema, or
null if not set.
-
setInputSchema
Sets the tool's argument schema.- Parameters:
value- The new value. Can benull to unset the property.- Returns:
- This object.
-
getOutputSchema
The tool's structured result schema.- Returns:
- The schema, or
null if not set.
-
setOutputSchema
Sets the tool's structured result schema.- Parameters:
value- The new value. Can benull to unset the property.- Returns:
- This object.
-