MCPcopy Create free account
hub / github.com/TanStack/ai / toolDescriptors

Function toolDescriptors

packages/ai-sandbox/src/remote-tools.ts:91–99  ·  view source on GitHub ↗
(tools: Array<AnyTool>)

Source from the content-addressed store, hash-verified

89 * Schemas before calling, the same way harness adapters advertise tools).
90 */
91export function toolDescriptors(tools: Array<AnyTool>): Array<ToolDescriptor> {
92 return tools.map((tool) => ({
93 name: tool.name,
94 description: tool.description,
95 inputSchema: isJsonSchemaObject(tool.inputSchema)
96 ? tool.inputSchema
97 : { type: 'object', properties: {} },
98 }))
99}
100
101function isJsonSchemaObject(
102 value: unknown,

Callers 3

driveContainerFunction · 0.90

Calls 1

isJsonSchemaObjectFunction · 0.70

Tested by

no test coverage detected