ToolParameter
A single declared input to an McpTool. The list of these on a tool is compiled into the inputSchema advertised by MCP tools/list, so name and type are part of the wire contract.
Constructors
Properties
Human/LLM-readable explanation of the argument.
The only accepted values, emitted as the schema's enum (for arrays, on items). Advisory — tools still validate their own input.
Element type for ParameterType.ARRAY parameters, emitted as the schema's items. When null an array still gets an unconstrained "items": {} — some clients (Gemini/OpenAI-compatible bridges) reject array schemas with no items at all.
Inclusive lower bound for ParameterType.INTEGER / ParameterType.NUMBER, emitted as minimum. Use it to advertise the range the tool clamps to.
Argument key the caller supplies and McpTool.execute reads from its params map.
Whether the argument must be present. Surfaced in the enclosing schema's required array by the protocol layer (not by toJsonSchema, which describes one property).
JSON Schema type of the value.
Functions
The JSON Schema fragment for this one parameter — { "type": ..., "description": ... }, plus items for arrays, enum, and minimum/maximum when declared. Required-ness is intentionally omitted here; the protocol layer aggregates it into the parent object schema's required list.