DefineToolOptions<TArgs, TResult>
Interface: DefineToolOptions<TArgs, TResult>
Defined in: src/core/tools.ts:337
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
capabilities?
readonlyoptionalcapabilities?: readonlyToolCapability[]
Defined in: src/core/tools.ts:356
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:350
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:353
The registered screen component that collects the check-in decision
(see Tool.checkInComponent). Requires checkIn.
description
readonlydescription:string
Defined in: src/core/tools.ts:339
inputSchema?
readonlyoptionalinputSchema?:Readonly<Record<string,unknown>>
Defined in: src/core/tools.ts:340
name
readonlyname:string
Defined in: src/core/tools.ts:338
needs?
readonlyoptionalneeds?:CredentialNeed
Defined in: src/core/tools.ts:343
Declare a credential this tool needs (declare-and-push). Resolved by the
framework before execute and injected as ctx.credential.
resultCeiling?
readonlyoptionalresultCeiling?:ToolResultCeiling
Defined in: src/core/tools.ts:359
Refuse (never truncate) a result over this many chars, teaching the model to narrow (see ToolResultCeiling). Omitted → byte-identical.
wants?
readonlyoptionalwants?:Readonly<Record<string,string>>
Defined in: src/core/tools.ts:347
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:360
Parameters
args
TArgs
ctx
Returns
TResult | Promise<TResult>
