MCPcopy Index your code
hub / github.com/developersdigest/llm-answer-engine / ToolDefinition

Interface ToolDefinition

lib/utils/tool-definition.ts:33–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31 * A tool definition contains all information required for a language model to generate tool calls.
32 */
33export interface ToolDefinition<
34 NAME extends string,
35 PARAMETERS extends z.AnyZodObject,
36> {
37 /**
38 * The name of the tool.
39 * Should be understandable for language models and unique among the tools that they know.
40 *
41 * Note: Using generics to enable result type inference when there are multiple tool calls.
42 */
43 name: NAME;
44
45 /**
46 * A optional description of what the tool does. Will be used by the language model to decide whether to use the tool.
47 */
48 description?: string;
49
50 /**
51 * The schema of the input that the tool expects. The language model will use this to generate the input.
52 * Use descriptions to make the input understandable for the language model.
53 */
54 parameters: PARAMETERS;
55}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected