MCPcopy
hub / github.com/CopilotKit/CopilotKit / toAgentToolDescriptors

Function toAgentToolDescriptors

packages/bot/src/tools.ts:76–84  ·  view source on GitHub ↗
(
  tools: ReadonlyArray<BotTool>,
)

Source from the content-addressed store, hash-verified

74}
75
76export function toAgentToolDescriptors(
77 tools: ReadonlyArray<BotTool>,
78): AgentToolDescriptor[] {
79 return tools.map((t) => ({
80 name: t.name,
81 description: t.description,
82 parameters: toJsonSchema(t.parameters),
83 }));
84}
85export const parseToolArgs = validateSchema;
86export function stringifyHandlerResult(value: unknown): string {
87 if (value == null) return "";

Callers 4

createBotFunction · 0.85
startFunction · 0.85
tools.test.tsFile · 0.85
runMethod · 0.85

Calls 1

toJsonSchemaFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…