MCPcopy Index your code
hub / github.com/simstudioai/sim / adaptAnthropicToolSchema

Function adaptAnthropicToolSchema

apps/sim/providers/tool-schema-adapter.ts:46–56  ·  view source on GitHub ↗
(tool: ProviderToolConfig)

Source from the content-addressed store, hash-verified

44 * Adapts a tool config to the Anthropic Messages `input_schema` shape.
45 */
46export 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}

Calls

no outgoing calls

Tested by

no test coverage detected