Interfaces
Tool<TArgs, TResult>
Interface: Tool<TArgs, TResult>
Defined in: src/core/tools.ts:23
One executable tool the Agent can call.
schemais what the LLM sees (name, description, JSON schema).executeruns when the LLM requests this tool with the given args. Returns anything JSON-serializable; the framework forwards it back to the LLM as the tool result.
Type Parameters
TArgs
TArgs = Record<string, unknown>
TResult
TResult = unknown
Properties
needs?
readonlyoptionalneeds?:CredentialNeed
Defined in: src/core/tools.ts:28
Declare-and-push: a credential this tool needs. The framework resolves it
BEFORE invoking and injects ctx.credential; it is NOT in schema, so the
LLM never sees or fills it.
schema
readonlyschema:LLMToolSchema
Defined in: src/core/tools.ts:24
Methods
execute()
execute(
args,ctx):TResult|Promise<TResult>
Defined in: src/core/tools.ts:29
Parameters
args
TArgs
ctx
Returns
TResult | Promise<TResult>
