Skip to content

Interface: AnyToolDefinition

Makaio Framework


Makaio Framework / tools-core / AnyToolDefinition

Defined in: ../../../tools/core/src/types.ts:142

Base tool definition interface with erased type parameters.

Use this type for collections (arrays, records) where specific input/output types are not needed. For type-safe individual tools, use ToolDefinition.

inputSchema: ZodType

Defined in: ../../../tools/core/src/types.ts:147

Zod schema for input validation


metadata: ToolMetadata

Defined in: ../../../tools/core/src/types.ts:144

Tool metadata (name, description, annotations)


outputSchema: ZodType

Defined in: ../../../tools/core/src/types.ts:150

Zod schema for output validation

execute(input, context): Promise<ToolResult<unknown>>

Defined in: ../../../tools/core/src/types.ts:160

Execute the tool with validated input. Method syntax enables bivariant checking, allowing ToolDefinition to be assignable to AnyToolDefinition for use in collections.

unknown

Validated input matching inputSchema

ToolExecutionContext

Execution context with cwd, env, platform, sessionId, adapter identity, bus, etc.

Promise<ToolResult<unknown>>

Promise resolving to success with data or failure with error