Skip to content

Graphorin API reference v0.4.0


Graphorin API reference / @graphorin/core / / ToolDefinition

Interface: ToolDefinition

Defined in: packages/core/src/contracts/provider.ts:200

Tool description shipped with a provider request. Implementations convert the user's Zod schema to a JSON Schema 7 fragment.

Stable

Properties

PropertyModifierTypeDescriptionDefined in
description?readonlystring-packages/core/src/contracts/provider.ts:202
examples?readonlyreadonly ToolDefinitionExample[]Worked examples surfaced to the provider alongside the schema. The agent runtime populates this from the tool's examples when they are eagerly rendered (see Tool.examplesEagerlyRendered); it is bounded to ≤5 and absent when the tool declares none or defers them. Implementations MAY fold these into the model-facing tool description.packages/core/src/contracts/provider.ts:211
inputSchemareadonlyReadonly<Record&lt;string, unknown&gt;>-packages/core/src/contracts/provider.ts:203
namereadonlystring-packages/core/src/contracts/provider.ts:201