(tool: ProviderToolConfig)
| 44 | * Adapts a tool config to the Anthropic Messages `input_schema` shape. |
| 45 | */ |
| 46 | export function adaptAnthropicToolSchema(tool: ProviderToolConfig): AnthropicToolSchema { |
| 47 | return { |
| 48 | name: tool.id, |
| 49 | description: tool.description, |
| 50 | input_schema: { |
| 51 | type: 'object', |
| 52 | properties: tool.parameters.properties, |
| 53 | required: tool.parameters.required, |
| 54 | }, |
| 55 | } |
| 56 | } |
no outgoing calls
no test coverage detected