Interface: AnyToolDefinition
Makaio Framework / tools-core / AnyToolDefinition
Interface: AnyToolDefinition
Section titled “Interface: 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.
Properties
Section titled “Properties”inputSchema
Section titled “inputSchema”inputSchema:
ZodType
Defined in: ../../../tools/core/src/types.ts:147
Zod schema for input validation
metadata
Section titled “metadata”metadata:
ToolMetadata
Defined in: ../../../tools/core/src/types.ts:144
Tool metadata (name, description, annotations)
outputSchema
Section titled “outputSchema”outputSchema:
ZodType
Defined in: ../../../tools/core/src/types.ts:150
Zod schema for output validation
Methods
Section titled “Methods”execute()
Section titled “execute()”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
Parameters
Section titled “Parameters”unknown
Validated input matching inputSchema
context
Section titled “context”Execution context with cwd, env, platform, sessionId, adapter identity, bus, etc.
Returns
Section titled “Returns”Promise<ToolResult<unknown>>
Promise resolving to success with data or failure with error