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

Function adaptOpenAIChatToolSchema

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

Source from the content-addressed store, hash-verified

30 * Adapts a tool config to the OpenAI Chat Completions function-wrapped shape.
31 */
32export function adaptOpenAIChatToolSchema(tool: ProviderToolConfig): OpenAIChatToolSchema {
33 return {
34 type: 'function',
35 function: {
36 name: tool.id,
37 description: tool.description,
38 parameters: tool.parameters,
39 },
40 }
41}
42
43/**
44 * Adapts a tool config to the Anthropic Messages `input_schema` shape.

Callers 15

index.tsFile · 0.90
index.tsFile · 0.90
index.tsFile · 0.90
index.tsFile · 0.90
index.tsFile · 0.90
index.tsFile · 0.90
index.tsFile · 0.90
index.tsFile · 0.90
index.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected