Tools, Skills & MCP — Extending OpenClaw
Complete guide to extending OpenClaw with custom skills, configuring search providers, troubleshooting tool errors, and understanding the skill loading system.
⚠️ The Problem
Users encounter various issues when working with OpenClaw's extensibility system: skills not loading, tools disappearing mid-session, web_search provider configuration, HTTP 400 tool_call_id errors, and confusion about where skills should be installed. Common error messages include 'Tool gog not found', 'HTTP 400: tool_call_id is not found', 'undici error' during skill installation, and skills working initially but failing after token expiry.
🔍 Why This Happens
Multiple root causes exist: (1) Skills placed in wrong directory — OpenClaw looks in ~/.clawdbot/skills/ by default, not ~/clawd/skills/. (2) OAuth tokens expire after ~1 hour and refresh mechanism may fail. (3) Session bloat causes tool schemas to get buried and tools to 'drift' over time. (4) Node version manager conflicts (nvm/fnm/volta) cause undici errors because the daemon's PATH excludes shell-initialized tools. (5) SKILL.md frontmatter has incorrect indentation. (6) The gateway enters a corrupted state after certain errors, requiring restart. (7) Google Workspace skills require both CLI installation AND OAuth authentication setup.
✅ The Fix
Understanding Skill Directories
OpenClaw loads skills from these locations in order of precedence:
<workspace>/skills— your workspace (highest priority)~/.clawdbot/skills/— managed overrides- Bundled skills (lowest priority)
Common mistake: Placing skills in ~/clawd/skills/ when OpenClaw expects ~/.clawdbot/skills/.
# Move skills to correct locationmv ~/clawd/skills/my-skill ~/.clawdbot/skills/# Or configure custom skills directory in clawdbot.json{ "skills": { "dir": "/path/to/your/skills", "entries": { "my-skill": { "enabled": true } } }}Configuring Web Search Providers
OpenClaw supports two search providers: Brave (default) and Perplexity.
Note: Google is NOT supported. Perplexity provides AI-synthesized answers with citations, which is often preferred over raw search results.
# Configure via CLIclawdbot configure --section web// Or manually in clawdbot.json:{ "tools": { "web": { "search": { "provider": "perplexity", "perplexity": { "apiKey": "your-perplexity-api-key", "model": "perplexity/sonar-pro", "baseUrl": "https://api.perplexity.ai" } } } }}# Or use environment variablesexport PERPLEXITY_API_KEY="pplx-xxxxx"# Can also route through OpenRouter:export OPENROUTER_API_KEY="sk-or-xxxxx"Fixing 'HTTP 400: tool_call_id is not found' Errors
This error typically cascades and breaks all subsequent messages. The gateway is in a corrupted state.
# Immediate fix — restart the gatewayclawdbot gateway restart# Check logs for root causeclawdbot gateway logs# If error persists, check for deleted/expired messagesclawdbot logsIf errors continue after restart:
- Note the exact message content that triggers it
- Check if original messages still exist in chat
- May indicate race condition from rapid responses
Fixing Skill OAuth Token Expiry (gog, etc.)
Google OAuth tokens expire after ~1 hour. The refresh mechanism sometimes fails silently.
# Force fresh token with consent screengog auth add you@gmail.com --force-consent# Or remove and re-addgog auth remove you@gmail.comgog auth add you@gmail.com# Verify tokens are validgog auth list --checkSetting Up gog (Google Workspace) Skill
The gog skill requires manual setup beyond just enabling it.
# 1. Install the CLIbrew install steipete/tap/gogcli# 2. Set up OAuth credentials (get from Google Cloud Console)# Create OAuth 2.0 Client ID, download client_secret.json# Add redirect URI: http://localhost:8080/oauth/callbackgog auth credentials /path/to/client_secret.json# 3. Authenticate with servicesgog auth add you@gmail.com --services gmail,calendar,drive,contacts,sheets,docs# 4. Set default account (optional)export GOG_ACCOUNT=you@gmail.com# 5. Verifygog auth listFixing 'Tool X not found' After Initial Success
If skills work initially but later show 'Tool not found':
# 1. Check skill directory configurationclawdbot config get skills.dir# 2. Verify skills are loadedclawdbot skills list# 3. Check skill logsclawdbot gateway logs | grep -i skill# 4. Restart gateway to reload skillsclawdbot gateway restartFixing Undici Errors During Skill Installation
Node version managers (nvm, fnm, volta, asdf) are intentionally excluded from the daemon's PATH because they require shell initialization.
# Option 1: Use system Node instead of nvmsource ~/.nvm/nvm.shnvm use systemnpx clawdhub@latest# Option 2: Use official installer (recommended)curl -fsSL https://clawd.bot/install.sh | bash# Option 3: Fix npm global permissions (Linux)mkdir -p ~/.npm-globalnpm config set prefix '~/.npm-global'export PATH=~/.npm-global/bin:$PATHnpx clawdhub@latestFixing Session Bloat & Tool Drift
As sessions grow, tool schemas get buried and tools become unreliable. Classic symptom: works fresh, degrades over time.
Prevention:
- Keep sessions shorter, start fresh when tools drift
- Use
/moltorclawdbot moltto clear session state - Monitor session size — anything over 1MB is problematic
- Document working workflows in persistent locations (MEMORY.md, not TOOLS.md)
Note: TOOLS.md is for YOUR notes about tools (camera names, SSH aliases). Procedures should go in MEMORY.md or documentation folders.
SKILL.md Frontmatter Format
Incorrect indentation in SKILL.md causes skills to fail loading.
---name: my-skilldescription: Description of what the skill does.metadata: {"clawdbot":{"emoji":"🔧","requires":{"bins":["node"],"env":["MY_API_KEY"]},"primaryEnv":"MY_API_KEY"}}---Important: No leading spaces on frontmatter lines!
Browser Automation Reliability
Browser automation (TheFork booking, form filling) can freeze or fail. This depends on:
- Model capability (use Sonnet 4 or GPT-5 for complex tasks)
- SKILLS.md quality and context
- Site complexity (heavy JS sites are harder)
Tips:
- Use
cliclickskill for cursor control if standard browser actions fail - Break complex tasks into smaller steps
- Verify each step before proceeding
🔥 Your AI should run your business, not just answer questions.
We'll show you how.Free to join.
📋 Quick Commands
| Command | Description |
|---|---|
| clawdbot skills list | List all loaded skills and their status |
| clawdbot configure --section web | Configure web search provider (Brave/Perplexity) |
| clawdbot gateway restart | Restart gateway to reload skills and clear corrupted state |
| clawdbot gateway logs | View gateway logs for debugging skill/tool issues |
| gog auth add EMAIL --force-consent | Force OAuth re-authentication for Google Workspace |
| gog auth list --check | Verify Google OAuth tokens are valid |
| clawdbot config get skills.dir | Check configured skills directory |
| mv ~/clawd/skills/X ~/.clawdbot/skills/ | Move skill to correct default location |
| curl -fsSL https://clawd.bot/install.sh | bash | Official installer (avoids nvm/undici issues) |
Related Issues
📚 You Might Also Like
OpenClaw Skills: Extend Your AI Assistant's Capabilities
Skills transform OpenClaw from a chatbot into an autonomous agent. Learn to use, install, and create your own skills.
How to Build Your Own Personal AI Assistant
Architecture guide for creating a customized AI assistant. Configure personality, add integrations, build custom skills, and create an AI that truly works for you.
1Password
Connect OpenClaw to 1Password for secure credential management. Inject secrets into skills, access vaults, and manage credentials programmatically.
OpenClaw March 2026 Update: PDF Tool, Telegram Streaming, Secrets Management & More
OpenClaw March 2026 Update: PDF Tool, Telegram Streaming, Secrets Management & More
🐙 Your AI should run your business.
Weekly live builds + template vault. We'll show you how to make AI actually work.Free to join.
Join Vibe Combinator →