Intelligence · interface
ToolDefinition
W is the consumer's world view, and this package never constrains it.
Explained in Agents and behaviour.
interface ToolDefinition<A, R, W>import type { ToolDefinition } from '@driftengine/ai';In depth
An engine package that knew what a world contained would be an engine package that
knew what game it was in. A guard asking world.exists(id) is the consumer's
sentence, written against the consumer's world.
Properties
| Name | Type | Description |
|---|---|---|
idreadonly | string | Stable and versioned — inspect@1. Never renumbered once shipped. |
descriptionreadonly | string | |
schemareadonly | ToolSchema | |
rateClassreadonlyoptional | string | |
idempotentreadonlyoptional | boolean |
Methods
admits
admits(args: A, world: W): booleanWhether this call is still true of the world.
| Parameter | Type | Description |
|---|---|---|
args | A | |
world | W |
More
Declared once, at registration, by the tool. The model never writes one: a model-authored precondition on a model-authored action is the model marking its own homework.
execute
execute(args: A, world: W): R| Parameter | Type | Description |
|---|---|---|
args | A | |
world | W |