Documentation / @agentick/shared / ToolDefinition
Interface: ToolDefinition ​
Defined in: tools.ts:145
Simplified tool definition - platform-independent base structure. Used for direct tool execution from clients.
Backend extends this with providerOptions, libraryOptions, mcpConfig.
Extended by ​
Properties ​
audience? ​
optionalaudience:"user"|"model"|"all"
Defined in: tools.ts:171
Controls who sees this tool.
- "model" (default): Sent to the model for tool_use
- "user": User dispatch only (hidden from model)
- "all": Both model and user dispatch
defaultResult? ​
optionaldefaultResult:ContentBlock[]
Defined in: tools.ts:191
Default result to use when requiresResponse is false. Returned immediately for render tools that don't need client feedback. Default: [{ type: 'text', text: '[{name} rendered on client]' }]
description ​
description:
string
Defined in: tools.ts:149
Tool description for the model
input ​
input:
Record<string,unknown>
Defined in: tools.ts:151
JSON Schema for tool input
intent? ​
optionalintent:ToolIntent
Defined in: tools.ts:164
Tool intent describes what the tool does (render, action, compute). Used by clients to determine how to render/handle tool calls. Default: COMPUTE
name ​
name:
string
Defined in: tools.ts:147
Tool name
output? ​
optionaloutput:Record<string,unknown>
Defined in: tools.ts:153
Optional JSON Schema for tool output (for validation/documentation)
requiresResponse? ​
optionalrequiresResponse:boolean
Defined in: tools.ts:179
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: tools.ts:185
Timeout in milliseconds when waiting for client response. Only applicable when requiresResponse is true. Default: 30000 (30 seconds)
type? ​
optionaltype:ToolExecutionType
Defined in: tools.ts:158
Tool execution type. Determines how the tool is executed. Default: SERVER (engine executes tool.run on server).