Tool Use
Tool use is the capability of an AI agent to call external functions during inference, enabling it to interact with systems beyond pure text generation. When an agent uses a tool, it generates a structured call that the runtime intercepts, executes, and returns results from — allowing the agent to read files, run code, query databases, send messages, and take real-world actions.
How Tool Use Works
- The LLM is provided a list of available tools with their names, descriptions, and parameter schemas
- During generation, the model decides to call a tool and outputs a structured tool call
- The runtime (e.g., Claude Code or an MCP client) intercepts the call
- The tool executes and returns a result
- The result is injected back into the model's context as a new message
- The model continues reasoning with the tool result available
Tool Use in Claude Code
Claude Code is built around tool use. Its core tools include:
- →
Read— Read file contents - →
Write/Edit— Create or modify files - →
Bash— Execute shell commands - →
Glob/Grep— Search the codebase - →
Agent— Spawn sub-agents for parallel work - → MCP tools — Any tools from connected MCP servers
Tool Use via MCP
The Model Context Protocol standardizes tool use for remote services. AgentRQ exposes tools like createTask, reply, and getTaskMessages as MCP tools, which Claude Code calls just like any other tool in its repertoire.
Safe Tool Use
Not all tools are equal in risk:
| Risk Level | Examples | Recommended Pattern |
|---|---|---|
| Low | Read files, search code | Autonomous |
| Medium | Write files, run tests | Autonomous with logging |
| High | Deploy to production, delete data | Require approval |
AgentRQ lets you enforce approval gates for high-risk tool calls via human-in-the-loop workflows.
Related Terms
- → MCP Tool
- → MCP
- → Claude Code
- → Agent
- → Approval