DefineToolOptions<TArgs, TResult>
Interface: DefineToolOptions<TArgs, TResult>
Defined in: src/tools/tools.ts:975
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/tools/tools.ts:1013
The declared argument grounds — see Tool.argumentsFrom.
askOrAssume?
readonlyoptionalaskOrAssume?:Readonly<Record<string,ArgumentRule>>
Defined in: src/tools/tools.ts:1027
Per-argument rules — what the library does when a call leaves an argument out (see Tool.askOrAssume). Omitted → byte-identical.
capabilities?
readonlyoptionalcapabilities?: readonlyToolCapability[]
Defined in: src/tools/tools.ts:994
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/tools/tools.ts:988
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/tools/tools.ts:991
The registered screen component that collects the check-in decision
(see Tool.checkInComponent). Requires checkIn.
composedOf?
readonlyoptionalcomposedOf?: readonlystring[]
Defined in: src/tools/tools.ts:1017
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/tools/tools.ts:977
gates?
readonlyoptionalgates?:boolean
Defined in: src/tools/tools.ts:1020
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/tools/tools.ts:978
name
readonlyname:string
Defined in: src/tools/tools.ts:976
needs?
readonlyoptionalneeds?:CredentialNeed
Defined in: src/tools/tools.ts:981
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/tools/tools.ts:1011
The stamped identity edge — see Tool.owner.
period?
readonlyoptionalperiod?:ToolPeriod
Defined in: src/tools/tools.ts:1030
Which argument sets the period the answer covers (see Tool.period). Requires a rule on that argument. Omitted → byte-identical.
repeatedWhen?
readonlyoptionalrepeatedWhen?:"arguments"
Defined in: src/tools/tools.ts:1024
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/tools/tools.ts:997
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/tools/tools.ts:1001
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/tools/tools.ts:1009
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/tools/tools.ts:1005
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/tools/tools.ts:985
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/tools/tools.ts:1031
Parameters
args
TArgs
ctx
Returns
TResult | Promise<TResult>
