Skip to content

IRTool

Defined in: packages/ai.matey.types/src/ir.ts:238

Tool/function definition.

Describes a tool that the AI can call.

const weatherTool: IRTool = {
name: 'get_weather',
description: 'Get current weather for a location',
parameters: {
type: 'object',
properties: {
location: {
type: 'string',
description: 'City name or coordinates'
},
units: {
type: 'string',
enum: ['celsius', 'fahrenheit'],
default: 'celsius'
}
},
required: ['location']
}
};

readonly description: string

Defined in: packages/ai.matey.types/src/ir.ts:247

Human-readable description of what the tool does.


readonly optional metadata: Record<string, unknown>

Defined in: packages/ai.matey.types/src/ir.ts:257

Provider-specific tool configuration.


readonly name: string

Defined in: packages/ai.matey.types/src/ir.ts:242

Tool name (must be valid identifier).


readonly parameters: JSONSchema

Defined in: packages/ai.matey.types/src/ir.ts:252

JSON Schema for tool parameters.