Documentation / @agentick/core / ToolDefinition
Interface: ToolDefinition ​
Defined in: core/src/tool/tool.ts:662
Tool definition in provider-compatible format (JSON Schema). This is what gets passed to model adapters.
Extends the base ToolDefinition from @agentick/shared with backend-specific fields.
Extends ​
Properties ​
audience? ​
optionalaudience:"user"|"model"|"all"
Defined in: shared/src/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
Inherited from ​
defaultResult? ​
optionaldefaultResult:ContentBlock[]
Defined in: shared/src/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]' }]
Inherited from ​
description ​
description:
string
Defined in: shared/src/tools.ts:149
Tool description for the model
Inherited from ​
input ​
input:
Record<string,unknown>
Defined in: shared/src/tools.ts:151
JSON Schema for tool input
Inherited from ​
intent? ​
optionalintent:ToolIntent
Defined in: shared/src/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
Inherited from ​
libraryOptions? ​
optionallibraryOptions:LibraryToolOptions
Defined in: core/src/tool/tool.ts:676
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:681
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: shared/src/tools.ts:147
Tool name
Inherited from ​
output? ​
optionaloutput:Record<string,unknown>
Defined in: shared/src/tools.ts:153
Optional JSON Schema for tool output (for validation/documentation)
Inherited from ​
providerOptions? ​
optionalproviderOptions:ProviderToolOptions
Defined in: core/src/tool/tool.ts:669
Provider-specific tool configurations. Keyed by provider name (e.g., 'openai', 'google', 'anthropic'). Adapters will use their provider-specific config when converting tools. Each adapter can extend this type using module augmentation.
requiresResponse? ​
optionalrequiresResponse:boolean
Defined in: shared/src/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
Inherited from ​
ToolDefinition.requiresResponse
timeout? ​
optionaltimeout:number
Defined in: shared/src/tools.ts:185
Timeout in milliseconds when waiting for client response. Only applicable when requiresResponse is true. Default: 30000 (30 seconds)
Inherited from ​
type? ​
optionaltype:ToolExecutionType
Defined in: shared/src/tools.ts:158
Tool execution type. Determines how the tool is executed. Default: SERVER (engine executes tool.run on server).