Agent.listTools()
The .listTools() method retrieves the tools configured for an agent, resolving them if they're a function. These tools extend the agent's capabilities, allowing it to perform specific actions or access external systems.
Usage exampleUsage example的直接链接
await agent.listTools()
ParametersParameters的直接链接
options?:
{ requestContext?: RequestContext }
= {}
Optional configuration object containing request context.
{ requestContext?: RequestContext }
requestContext?:
RequestContext
Request Context for dependency injection and contextual information.
ReturnsReturns的直接链接
tools:
TTools | Promise<TTools>
The tools configured for the agent, either as a direct object or a promise that resolves to the tools.
Extended usage exampleExtended usage example的直接链接
await agent.listTools({
requestContext: new RequestContext(),
})