Interface: DefineToolConfig<TInput, TOutput>
Makaio Framework / tools-core / DefineToolConfig
Interface: DefineToolConfig<TInput, TOutput>
Section titled “Interface: DefineToolConfig<TInput, TOutput>”Defined in: ../../../tools/core/src/define-tool.ts:11
Configuration object for defining a tool. Provides ergonomic API for creating ToolDefinition instances.
Type Parameters
Section titled “Type Parameters”TInput
Section titled “TInput”TInput extends z.ZodTypeAny
Zod schema type for input validation
TOutput
Section titled “TOutput”TOutput extends z.ZodTypeAny
Zod schema type for output validation
Properties
Section titled “Properties”annotations?
Section titled “annotations?”
optionalannotations?:object
Defined in: ../../../tools/core/src/define-tool.ts:19
Optional behavior annotations for consumers
destructive?
Section titled “destructive?”
optionaldestructive?:boolean
Tool may permanently delete or modify data
idempotent?
Section titled “idempotent?”
optionalidempotent?:boolean
Calling the tool multiple times with same input has same effect
readOnly?
Section titled “readOnly?”
optionalreadOnly?:boolean
Tool only reads data, doesn’t modify anything
requiresApproval?
Section titled “requiresApproval?”
optionalrequiresApproval?:boolean
Tool execution requires user approval
description
Section titled “description”description:
string
Defined in: ../../../tools/core/src/define-tool.ts:16
Human-readable description of what the tool does
execute
Section titled “execute”execute: (
input,context) =>Promise<ToolResult<output<TOutput>>>
Defined in: ../../../tools/core/src/define-tool.ts:33
Tool execution function.
Parameters
Section titled “Parameters”output<TInput>
Validated input matching inputSchema
context
Section titled “context”Execution context with cwd, env, platform, sessionId, bus, etc.
Returns
Section titled “Returns”Promise<ToolResult<output<TOutput>>>
Promise resolving to success with data or failure with error
inputSchema
Section titled “inputSchema”inputSchema:
TInput
Defined in: ../../../tools/core/src/define-tool.ts:22
Zod schema for input validation
name:
string
Defined in: ../../../tools/core/src/define-tool.ts:13
Unique tool name (identifier)
outputSchema
Section titled “outputSchema”outputSchema:
TOutput
Defined in: ../../../tools/core/src/define-tool.ts:25
Zod schema for output validation