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

FieldTypeNotes
workspaceIdstringrequired — Workspace that will own the new tool.
namestringrequired — LLM-facing tool name.
target"server" | "client"required
inputSchemaIdstringrequired — Input contract — required. For server tools wrapping a function, typically equal to function_version.inputSchemaId.
outputSchemaIdstringrequired — Output contract — required. Mirrors inputSchemaId.
descriptionstring | undefinedoptional — When-to-use hint for the LLM. Strongly recommended even though optional.
functionIdstring | undefinedoptional — Required when target is server. Must be omitted when target is client.
functionVersionIdstring | undefinedoptional — Optional pin to a specific function version. Defaults to tracking the function's defaultVersionId.
examplesArray<{ args: Record<string, unknown>; result?: unknown; }> | undefinedoptional — Optional few-shot examples.
requiresConfirmationboolean | undefinedoptional — Default false. Set true for destructive tools that should prompt the user before dispatch.
enabledboolean | undefinedoptional — Default true. Set false to mute the tool without unbinding.