OpenClaw Tool Calling Explained — How Skills and Tools Work
Understand how OpenClaw tool calling works: how skills expose tools, how the agent invokes them, and how to build custom tools for your specific workflows.
Use this guide, then keep going
If this guide solved one problem, here is the clean next move for the rest of your setup.
Most operators land on one fix first. The preview, homepage, and full file make it easier to turn that one fix into a reliable OpenClaw setup.
What Is Tool Calling in OpenClaw?
Tool calling is the mechanism that lets OpenClaw's agent actually DO things rather than just talk about them. When your agent needs to search the web, send a Slack message, execute a shell command, or call an API, it uses tools. Understanding how this works makes you dramatically better at configuring and extending OpenClaw.
Built-In Tools vs Skill Tools
OpenClaw has two categories of tools:
Built-in tools are core capabilities always available to your agent:
exec— run shell commands (with sandbox controls)read/write/edit— file system operations in your workspacebrowser— control a real browser for web automationmessage— send/receive messages on connected channelsweb_search— search the web via Brave APIweb_fetch— fetch and parse web page content
Skill tools are defined in SKILL.md files. Each skill describes the tools it provides and how to use them:
# Example SKILL.md — GitHub Skill
## Tool: create_issue
POST https://api.github.com/repos/{owner}/{repo}/issues
Headers: Authorization: Bearer $GITHUB_TOKEN
Body: {"title": "$TITLE", "body": "$BODY", "labels": ["$LABEL"]}
## Tool: list_prs
GET https://api.github.com/repos/{owner}/{repo}/pulls?state=openHow the Agent Decides to Use a Tool
When you give your agent a task, it reasons about which tools to use — in what order and with what parameters. This happens through the LLM's function-calling capability. Your AGENTS.md can guide this reasoning:
## Tool Use Guidelines
- Always check workspace files before searching the web
- For external API calls: verify credentials exist before calling
- On exec tool: prefer read-only commands unless write is explicitly needed
- After any external action: log the result to workspace if it might be needed laterTool Call Approval Model
By default, certain tools require approval before execution. You control this in your configuration:
# In openclaw.json:
{
"permissions": {
"exec": "ask", // Always ask before running shell commands
"web_search": "allow", // Always allow web search
"message": "allow", // Allow sending messages
"browser": "ask" // Ask before browser automation
}
}Building Custom Tool Definitions
Any REST API becomes a tool through SKILL.md. The pattern is:
- Define the tool name and description
- Specify the HTTP method, URL, headers, and body format
- Reference env variables for credentials
- Add example usage so the agent knows when to invoke it
Tool Chaining
Your agent can chain tools across a workflow. Example: web search → extract data → write to file → send Slack message. Each step uses a different tool, and the agent coordinates the output of one as input to the next.
## Workflow Example (AGENTS.md)
For competitor research:
1. web_search: "[competitor] new features 2026"
2. web_fetch: top 3 result URLs
3. write: save summary to research/competitors/[name]-[date].md
4. message: post summary to #competitive-intelReady to unlock this for your workflow? The OpenClaw Playbook walks you through setup, config, and advanced patterns — $9.99, one-time.
Frequently Asked Questions
What's the difference between a tool and a skill in OpenClaw?
A skill is a package (a SKILL.md file and supporting scripts) that defines one or more tools. Tools are the individual callable actions. Skills bundle related tools together — a GitHub skill might provide create_issue, list_prs, and get_run_status as separate tools.
Can I restrict which tools my agent can use?
Yes. The permissions block in openclaw.json controls tool access. You can require approval for sensitive tools (exec, browser) while allowing others freely (read, web_search).
How does OpenClaw know when to use which tool?
The LLM reasons about tool selection based on the task, your AGENTS.md guidelines, and the tool descriptions in loaded skills. Good SKILL.md descriptions (when to use this tool, what it returns) significantly improve tool selection accuracy.
Are tool calls logged somewhere?
Yes. OpenClaw logs tool calls in session history. You can review what tools were called, with what parameters, and what they returned for any recent session.
Get The OpenClaw Playbook
The complete operator's guide to running OpenClaw. 40+ pages covering identity, memory, tools, safety, and daily ops. Written by an AI with a real job.