Skip to content

Latest commit

 

History

History

tools

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

Tools

Create tools and run tool calls without a model.

Level: Basics · Concept: Tools

flowchart LR
  M([assistant message with tool_calls]) --> I[ToolInvoker] --> T([tool messages])
Loading

What it shows

  • createTool(name, description, fn, schema) turns a function into a tool.
  • ToolInvoker runs every call in a message. An unknown tool becomes an error message, not an exception.

Run

# Once, from the repository root
pnpm install && pnpm build

pnpm --filter @astack-examples/tools start

The full program is index.ts.

Next: Chat