DefineToolOptions<TArgs, TResult>
Interface: DefineToolOptions<TArgs, TResult>
Defined in: src/core/tools.ts:894
Convenience input for defineTool — flatter than Tool itself.
Consumers describe the tool inline; the helper assembles schema.
inputSchema is a JSON Schema object (the same one the LLM will
see). For tools that take no arguments, pass { type: 'object', properties: {} } or omit and we'll default to that.
Type Parameters
TArgs
TArgs
TResult
TResult
Properties
argumentsFrom?
readonlyoptionalargumentsFrom?: readonlystring[]
Defined in: src/core/tools.ts:932
The declared argument grounds — see Tool.argumentsFrom.
capabilities?
readonlyoptionalcapabilities?: readonlyToolCapability[]
Defined in: src/core/tools.ts:913
Declare what this tool touches (see Tool.capabilities). Consulted only when the configured checker declares it governs them.
checkIn?
readonlyoptionalcheckIn?:CheckInDemand<TArgs>
Defined in: src/core/tools.ts:907
Demand a human check-in before this tool runs (see Tool.checkIn).
'always' or a (args, ctx) => boolean predicate.
checkInComponent?
readonlyoptionalcheckInComponent?:AskComponent
Defined in: src/core/tools.ts:910
The registered screen component that collects the check-in decision
(see Tool.checkInComponent). Requires checkIn.
composedOf?
readonlyoptionalcomposedOf?: readonlystring[]
Defined in: src/core/tools.ts:936
The named ingredient tools this tool calls through ctx.tools — see
Tool.composedOf. Drift-checked at agent build, when the catalog
is complete. Omitted → nothing checked, byte-identical.
description
readonlydescription:string
Defined in: src/core/tools.ts:896
gates?
readonlyoptionalgates?:boolean
Defined in: src/core/tools.ts:939
Whether this tool's procedure can raise an approval gate — see Tool.gates. Omitted → nothing declared, byte-identical.
inputSchema?
readonlyoptionalinputSchema?:Readonly<Record<string,unknown>>
Defined in: src/core/tools.ts:897
name
readonlyname:string
Defined in: src/core/tools.ts:895
needs?
readonlyoptionalneeds?:CredentialNeed
Defined in: src/core/tools.ts:900
Declare a credential this tool needs (declare-and-push). Resolved by the
framework before execute and injected as ctx.credential.
owner?
readonlyoptionalowner?:ToolOwner
Defined in: src/core/tools.ts:930
The stamped identity edge — see Tool.owner.
repeatedWhen?
readonlyoptionalrepeatedWhen?:"arguments"
Defined in: src/core/tools.ts:943
Fingerprint the repeated-call ledger on arguments alone, ignoring this tool's own result — see Tool.repeatedWhen. Omitted → byte-identical (the ledger keeps comparing results, as always).
resultCeiling?
readonlyoptionalresultCeiling?:ToolResultCeiling
Defined in: src/core/tools.ts:916
Refuse (never truncate) a result over this many chars, teaching the model to narrow (see ToolResultCeiling). Omitted → byte-identical.
resultClass?
readonlyoptionalresultClass?:ToolResultClass
Defined in: src/core/tools.ts:920
The declared class of this tool's results — 'triage' or 'inventory'
(see Tool.resultClass). Keys the check:semantics per-class
rules. Omitted → no class rules.
resultColumns?
readonlyoptionalresultColumns?:Readonly<Record<string,ColumnType|ColumnDeclaration>>
Defined in: src/core/tools.ts:928
What this tool's ROWS contain — column name to type (see
Tool.resultColumns). Needs the checkColumnTypes dial too.
Omitted → nothing measured, byte-identical.
resultKind?
readonlyoptionalresultKind?:string
Defined in: src/core/tools.ts:924
The artifact kind a PLACED result is minted under, in the consumer's
vocabulary (see Tool.resultKind). Omitted →
tool-result/<name>, byte-identical.
wants?
readonlyoptionalwants?:Readonly<Record<string,string>>
Defined in: src/core/tools.ts:904
Declare artifact arguments: arg name → required artifact kind (see
Tool.wants). The model passes the art_… ref; the framework
resolves it before execute and the handler reads the data.
Methods
execute()
execute(
args,ctx):TResult|Promise<TResult>
Defined in: src/core/tools.ts:944
Parameters
args
TArgs
ctx
Returns
TResult | Promise<TResult>
