Skip to content

Latest commit

 

History

History
75 lines (54 loc) · 3.13 KB

File metadata and controls

75 lines (54 loc) · 3.13 KB
title Tool
description Tool protocol schemas

{/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */}

Tool Category

Classifies the tool by its operational domain.

**Source:** `packages/spec/src/ai/tool.zod.ts`

TypeScript Usage

import { Tool, ToolCategory } from '@objectstack/spec/ai';
import type { Tool, ToolCategory } from '@objectstack/spec/ai';

// Validate data
const result = Tool.parse(data);

Tool

AI tool definition. [READ-ONLY PROJECTION — not an execution entry point] Authoring a tool as metadata does NOT make it runnable: this schema has no implementation/handler field and no framework executor loads a metadata-authored tool. The runtime executes a separately-registered AIToolDefinition (cloud @objectstack/service-ai); tool metadata is a one-way projection for Studio/discovery. Do not expect a hand-authored tool to run in the open edition (liveness audit #1878/#1892).

Properties

Property Type Required Description
name string Tool unique identifier (snake_case)
label string Tool display name
description string Tool description for LLM function calling
category Enum<'data' | 'action' | 'flow' | 'integration' | 'vector_search' | 'analytics' | 'utility'> optional Tool category for grouping and filtering
parameters Record<string, any> JSON Schema for tool parameters
outputSchema Record<string, any> optional JSON Schema for tool output
objectName string optional Target object name (snake_case)
requiresConfirmation boolean Require user confirmation before execution
permissions string[] optional Required permission-set capabilities
active boolean Whether the tool is enabled
builtIn boolean Platform built-in tool flag
protection { lock: Enum<'none' | 'no-overlay' | 'no-delete' | 'full'>; reason: string; docsUrl?: string } optional Package author protection block — lock policy for this tool.
_lock Enum<'none' | 'no-overlay' | 'no-delete' | 'full'> optional Item-level lock — controls overlay & delete (ADR-0010).
_lockReason string optional Human-readable reason shown when a write is refused by _lock.
_lockSource Enum<'artifact' | 'package' | 'env-forced'> optional Layer that set _lock (artifact | package | env-forced).
_provenance Enum<'package' | 'org' | 'env-forced'> optional Origin of the item (package | org | env-forced).
_packageId string optional Owning package machine id.
_packageVersion string optional Owning package version.
_lockDocsUrl string optional Optional documentation link surfaced next to _lockReason.

ToolCategory

Tool operational category

Allowed Values

  • data
  • action
  • flow
  • integration
  • vector_search
  • analytics
  • utility