Documentation / @agentick/core / ToolMetadata
Interface: ToolMetadata<TInput, TOutput> ​
Defined in: core/src/tool/tool.ts:689
Type Parameters ​
TInput ​
TInput = any
TOutput ​
TOutput = any
Properties ​
aliases? ​
optionalaliases:string[]
Defined in: core/src/tool/tool.ts:780
Alternative names for user dispatch (e.g. ["mount"] for "add-dir").
audience? ​
optionalaudience:ToolAudience
Defined in: core/src/tool/tool.ts:777
Controls who sees this tool. "model" (default) = model only, "user" = dispatch only, "all" = both.
confirmationMessage? ​
optionalconfirmationMessage:string| (input) =>string
Defined in: core/src/tool/tool.ts:746
Message to show user when requesting confirmation. Can be a string or a function that receives the input. Default: "Allow {tool_name} to execute?"
confirmationPreview()? ​
optionalconfirmationPreview: (input,deps) =>Promise<Record<string,unknown>>
Defined in: core/src/tool/tool.ts:750
Async preview metadata for confirmation UI (e.g. diff).
Parameters ​
input ​
any
deps ​
any
Returns ​
Promise<Record<string, unknown>>
defaultResult? ​
optionaldefaultResult:ContentBlock[]
Defined in: core/src/tool/tool.ts:728
Default result to use when requiresResponse is false. Returned immediately for render tools that don't need client feedback. Default: [{ type: 'text', text: '[{tool_name} rendered on client]' }]
description ​
description:
string
Defined in: core/src/tool/tool.ts:691
displaySummary()? ​
optionaldisplaySummary: (input) =>string
Defined in: core/src/tool/tool.ts:748
Short summary string for tool call indicators.
Parameters ​
input ​
any
Returns ​
string
input ​
input:
ZodSchema<TInput>
Defined in: core/src/tool/tool.ts:692
intent? ​
optionalintent:ToolIntent
Defined in: core/src/tool/tool.ts:708
Tool intent describes what the tool does (render, action, compute). Used by clients to determine how to render/handle tool calls. Default: COMPUTE
libraryOptions? ​
optionallibraryOptions:LibraryToolOptions
Defined in: core/src/tool/tool.ts:764
Library-specific tool configurations. Keyed by library name (e.g., 'ai-sdk', 'langchain', 'llamaindex'). Used by adapters for library-specific tool behavior (timeouts, callbacks, etc.). Each adapter can extend this type using module augmentation.
mcpConfig? ​
optionalmcpConfig:object
Defined in: core/src/tool/tool.ts:769
MCP-specific configuration (only relevant if type === 'mcp'). Contains connection info and MCP server details.
Index Signature ​
[key: string]: any
serverName? ​
optionalserverName:string
serverUrl? ​
optionalserverUrl:string
transport? ​
optionaltransport:"websocket"|"sse"|"stdio"
name ​
name:
string
Defined in: core/src/tool/tool.ts:690
output? ​
optionaloutput:ZodSchema<TOutput>
Defined in: core/src/tool/tool.ts:697
Optional Zod schema for output validation. Used for type-safe tool composition and workflow orchestration.
providerOptions? ​
optionalproviderOptions:ProviderToolOptions
Defined in: core/src/tool/tool.ts:757
Provider-specific tool configurations. Keyed by provider name (e.g., 'openai', 'google', 'anthropic'). Preserved when converting to ToolDefinition. Each adapter can extend this type using module augmentation.
requiresConfirmation? ​
optionalrequiresConfirmation:boolean| (input) =>boolean|Promise<boolean>
Defined in: core/src/tool/tool.ts:740
Whether execution requires user confirmation before running. Applies to any tool type (SERVER, CLIENT, MCP).
- boolean: Always require (true) or never require (false)
- function: Conditional - receives input, returns whether confirmation needed. Can be async to check persisted "always allow" state. Use Context.get() inside the function to access execution context.
Default: false
requiresResponse? ​
optionalrequiresResponse:boolean
Defined in: core/src/tool/tool.ts:716
Whether execution should wait for client response. Only applicable for CLIENT type tools.
- true: Server pauses and waits for tool_result from client (e.g., forms)
- false: Server continues immediately with defaultResult (e.g., charts) Default: false
timeout? ​
optionaltimeout:number
Defined in: core/src/tool/tool.ts:722
Timeout in milliseconds when waiting for client response. Only applicable when requiresResponse is true. Default: 30000 (30 seconds)
type? ​
optionaltype:ToolExecutionType
Defined in: core/src/tool/tool.ts:702
Tool execution type. Determines how the tool is executed. Default: SERVER (engine executes tool.run on server).