Queue Docs
Get Started
Integrations
Agents
Tool Use
Give your agent tools to run code, search, and call APIs.
Tool Use
Tools extend what your agent can do beyond generating text. Each tool is a function the model can choose to call during its reasoning loop.
Built-in Tools
The platform ships with built-in tools for web search, code execution, file reading, and external API calls. You can enable them per-agent in configuration.
Custom Tools
Define your own tools with a name, description, and input/output schema. The model uses the description to decide when to call the tool.
Tool Safety
Tools that perform write operations (file edits, API calls, database mutations) should include confirmation steps or be scoped with permission checks.
How tools work
When the agent decides to use a tool, it emits a structured tool call: the tool name, and a JSON payload matching the tool’s input schema. Queue intercepts the call, executes the tool, and returns the result back to the model as the next message in context.
This cycle — reason, call, observe — is what allows Queue agents to interact with real systems rather than just generating text.
Built-in tools
read_file
Read the full contents of a file from the current workspace or a mounted repo. The agent uses this constantly: to understand the codebase before making changes, to check existing tests, to read config files.
write_file
Write or overwrite a file. Queue tracks all writes in the run trace so you can see exactly what changed and diff it against the original.
run_command
Run a shell command in the sandboxed execution environment. Use it to run tests, linters, build steps, or any other process your workflow requires.
search_codebase
Semantic search across your codebase. More powerful than grep for finding where a concept, pattern, or interface is used — especially useful for large repos where reading every file would exhaust the context window.
github_*
A suite of GitHub tools: read a PR, list commits, create a branch, open a pull request, post a comment. Enabled when you connect the GitHub integration.
Defining custom tools
Custom tools are functions you expose to the agent via the SDK. Define them with a name, a description, and a Zod or JSON Schema input spec. Queue serializes them into the agent context automatically.
The description is critical. The model reads it to decide when and how to use the tool. Be explicit about what the tool does, what its inputs mean, and under what circumstances it should be called.
Tool safety
Tools that write data, call external APIs, or modify state should be used carefully. Queue supports tool confirmation policies: you can require human approval before a specific tool is executed, or restrict certain tools to read-only contexts.
In production, scope your agents’ tool access to the minimum needed. An agent that only needs to read code should not have write_file in its tool list.
On this page