Build the input/output JSON Schemas that describe an action as a tool.
const adapter = new ToolAdapter(schema, { city: z.string().describe('City and country'),});const inputSchema = valueOrThrow(adapter.getInputSchema()); Copy
const adapter = new ToolAdapter(schema, { city: z.string().describe('City and country'),});const inputSchema = valueOrThrow(adapter.getInputSchema());
JSON Schema for the tool's callable inputs (autofilled inputs excluded).
JSON Schema for the tool's result, honoring output_to_json_field.
output_to_json_field
Build the input/output JSON Schemas that describe an action as a tool.
Example: Supply the value shape TypeScript cannot derive from a MIME type.