Class McpToolSpec

java.lang.Object
org.apache.juneau.rest.server.mcp.McpToolSpec

public class McpToolSpec extends Object
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 Details

  • Method Details

    • getName

      public String getName()
      The tool name, used to route tools/call requests.
      Returns:
      The name, or null if not set.
    • setName

      public McpToolSpec setName(String value)
      Sets the tool name.
      Parameters:
      value - The new value. Can be null 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 be null 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 be null 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 be null to unset the property.
      Returns:
      This object.