toAnthropicToolSchema
function toAnthropicToolSchema(node): Record<string, unknown>;Defined in: core/src/schema.ts:401
Sanitize a tool’s JSON Schema for Anthropic’s Messages API.
Anthropic rejects schemas where the root is an anyOf / oneOf / allOf union,
requiring a root object schema ({ type: "object", properties: ... }).
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
node |
unknown |
Returns
Section titled “Returns”Record<string, unknown>