MCPcopy Index your code
hub / github.com/TanStack/ai / serverTool

Function serverTool

packages/ai/tests/test-utils.ts:253–262  ·  view source on GitHub ↗
(
  name: string,
  executeFn: (args: unknown) => unknown,
)

Source from the content-addressed store, hash-verified

251
252/** Simple server tool for testing. */
253export function serverTool(
254 name: string,
255 executeFn: (args: unknown) => unknown,
256): Tool {
257 return {
258 name,
259 description: `Test tool: ${name}`,
260 execute: executeFn,
261 }
262}
263
264/** Client tool (no execute function). */
265export function clientTool(

Calls

no outgoing calls

Tested by 1

runWithToolAndCaptureFunction · 0.72