mcp-tool-discovery
Skill8 starsChanged 43 days agoApache-2.0View on GitHub
How to discover and use MCP tools when you're unsure which one is configured. Triggers when an agent doesn't know whether an MCP tool exists for a task, or when a task description maps to multiple possible MCP servers.
In this repository17 other files it gives its agents.
- AGENTSAGENTS.md
- amazon-bedrockSkill
- amazon-location-serviceSkill
- amazon-polly-generativeSkill
- aws-architecture-diagramSkill
- aws-diagram-htmlSkill
- aws-diagram-pngSkill
- aws-serverless-patternsSkill
- cdk-infrastructure-patternsSkill
- cognito-email-migrationSkill
- cognito-passkey-authSkill
- deploy-on-awsSkill
- email-template-renderingSkill
- personal-rules-managementSkill
- react-frontend-patternsSkill
- reinvent-stack-toolkitSkill
- testing-patternsSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 9
When you need to perform an action and aren't sure whether an MCP tool exists for it, follow this discovery flow BEFORE shelling out to a …
- Very specific: line 53
After tool_search activates a matched tool, invoke it with just the tool_name (not the prefixed server_name::tool_name).
- Distinctive: line 77
Only fall back to a CLI command when:
- Distinctive: line 93
If you find yourself reaching for a CLI when an MCP server is available, stop and switch to the MCP tool.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
MCP Tool Discovery
When you need to perform an action and aren't sure whether an MCP tool exists for it, follow this discovery flow BEFORE shelling out to a CLI command.
Decision Tree
Need to do X?
│
├─ 1. Is there a configured MCP server that obviously handles X?
│ (github → github MCP, AWS → aws-mcp-server, search → web-search, etc.)
│ YES → use it
│ NO → continue
│
├─ 2. Use the `tool_search` tool to find matching MCP tools
│ `tool_search(query="<keywords>")`
│ Match found → use it
│ No match → continue
│
└─ 3. Fall back to a CLI command via shell
(only if no MCP tool exists for the operation)Using tool_search
The tool_search tool loads MCP tool definitions on demand. It accepts either:
tool_id(exact match inserver_name::tool_nameformat) — when you know the exact toolquery(keyword search) — when you're exploring
Examples
# Looking for any GitHub tool
tool_search(query="github pull request")
→ returns: github::create_pull_request, github::get_pull_request, github::list_pull_requests, …
# Looking for browser automation
tool_search(query="browser screenshot")
→ returns: playwright::*, chrome-devtools::*, browser-lens::*
# Looking for AWS Cost Explorer
tool_search(query="aws cost")
→ returns: aws-mcp-server::run_script (sandboxed Python with call_boto3() — use for Cost Explorer + Pricing API; call_aws was removed Aug 31, 2026)After tool_search activates a matched tool, invoke it with just the tool_name (not the prefixed server_name::tool_name). For example, if the search returned github::create_repository, call create_repository, not github::create_repository.
Common Mappings (Cheat Sheet)
| What you need | MCP server | Example tool |
| Create a GitHub repo | github | create_repository |
| Read a file from GitHub | github | get_file_contents |
| Search code on GitHub | github | search_code |
| Make any AWS API call | aws-mcp-server | run_script (sandboxed Python, call_boto3()) |
| Run sandboxed Python with AWS access | aws-mcp-server | run_script |
| Search AWS docs | aws-mcp-server | search_documentation |
| Search the web | web-search | search |
| Look up library docs (React, Vite, AWS SDK, etc.) | context7 | query-docs |
| Browser automation / E2E | playwright or chrome-devtools | various |
| Inspect live CSS / Figma diff | browser-lens | various |
| Generate UI components from a description | 21st-dev-magic | /ui ... |
| Pull Figma layout | figma | various |
| Read Google Docs/Sheets | google-drive | search_files, read_file_content |
| Generate an image | bedrock-image-mcp-server | generate_image |
| Sequential reasoning / planning | sequentialthinking | sequentialthinking |
When to Fall Back to CLI
Only fall back to a CLI command when:
tool_searchreturns nothing- AND the configured MCP servers obviously don't cover this operation
- AND the operation is genuinely necessary
Even then: prefer the AWS CLI shell tool over gh, curl, or other commands, since aws is more portable across machines.
Anti-Patterns
❌ Don't shell out to gh for github.com operations — the github MCP server handles all of them
❌ Don't use curl against AWS endpoints — use aws-mcp-server
❌ Don't use web_fetch against docs.aws.amazon.com — use the AWS docs-search tool (search_documentation), resolving the exact callable name via tool_search first (see steering/aws-agent-toolkit.md)
❌ Don't guess library API surfaces from training data — use context7 for live docs
❌ Don't manually craft Playwright selectors for live debugging — use playwright MCP's generate_locator tool, browser-lens, or chrome-devtools
If you find yourself reaching for a CLI when an MCP server is available, stop and switch to the MCP tool.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

