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

Function cloneToolSchemas

apps/sim/lib/copilot/chat/payload.ts:81–91  ·  view source on GitHub ↗
(toolSchemas: ToolSchema[])

Source from the content-addressed store, hash-verified

79}
80
81function cloneToolSchemas(toolSchemas: ToolSchema[]): ToolSchema[] {
82 return toolSchemas.map((tool) => {
83 const cloned: ToolSchema = {
84 ...tool,
85 input_schema: { ...tool.input_schema },
86 }
87 if (tool.params) cloned.params = { ...tool.params }
88 if (tool.oauth) cloned.oauth = { ...tool.oauth }
89 return cloned
90 })
91}
92
93export function clearIntegrationToolSchemaCacheForTests(): void {
94 integrationToolSchemaCache.clear()

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected