CreateToolBody
Request body for creating a Tool.
Definition
TypeScript
interface CreateToolBody {
workspaceId: string;
name: string;
target: "server" | "client";
inputSchemaId: string;
outputSchemaId: string;
description?: string | undefined;
functionId?: string | undefined;
functionVersionId?: string | undefined;
examples?:
| Array<{ args: Record<string, unknown>; result?: unknown }>
| undefined;
requiresConfirmation?: boolean | undefined;
enabled?: boolean | undefined;
}Fields
| Field | Type | Notes |
|---|---|---|
workspaceId | string | required — Workspace that will own the new tool. |
name | string | required — LLM-facing tool name. |
target | "server" | "client" | required |
inputSchemaId | string | required — Input contract — required. For server tools wrapping a function, typically equal to function_version.inputSchemaId. |
outputSchemaId | string | required — Output contract — required. Mirrors inputSchemaId. |
description | string | undefined | optional — When-to-use hint for the LLM. Strongly recommended even though optional. |
functionId | string | undefined | optional — Required when target is server. Must be omitted when target is client. |
functionVersionId | string | undefined | optional — Optional pin to a specific function version. Defaults to tracking the function's defaultVersionId. |
examples | Array<{ args: Record<string, unknown>; result?: unknown; }> | undefined | optional — Optional few-shot examples. |
requiresConfirmation | boolean | undefined | optional — Default false. Set true for destructive tools that should prompt the user before dispatch. |
enabled | boolean | undefined | optional — Default true. Set false to mute the tool without unbinding. |