agentleFS
seandkendallseandkendall/kiro-config/skills/mcp-tool-discovery/SKILL.md

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.

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
  1. Distinctive:

    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 …

    line 9
  2. Very specific:

    After tool_search activates a matched tool, invoke it with just the tool_name (not the prefixed server_name::tool_name).

    line 53
  3. Distinctive:

    Only fall back to a CLI command when:

    line 77
  4. Distinctive:

    If you find yourself reaching for a CLI when an MCP server is available, stop and switch to the MCP tool.

    line 93

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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 in server_name::tool_name format) — when you know the exact tool
  • query (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 needMCP serverExample tool
Create a GitHub repogithubcreate_repository
Read a file from GitHubgithubget_file_contents
Search code on GitHubgithubsearch_code
Make any AWS API callaws-mcp-serverrun_script (sandboxed Python, call_boto3())
Run sandboxed Python with AWS accessaws-mcp-serverrun_script
Search AWS docsaws-mcp-serversearch_documentation
Search the webweb-searchsearch
Look up library docs (React, Vite, AWS SDK, etc.)context7query-docs
Browser automation / E2Eplaywright or chrome-devtoolsvarious
Inspect live CSS / Figma diffbrowser-lensvarious
Generate UI components from a description21st-dev-magic/ui ...
Pull Figma layoutfigmavarious
Read Google Docs/Sheetsgoogle-drivesearch_files, read_file_content
Generate an imagebedrock-image-mcp-servergenerate_image
Sequential reasoning / planningsequentialthinkingsequentialthinking

When to Fall Back to CLI

Only fall back to a CLI command when:

  1. tool_search returns nothing
  2. AND the configured MCP servers obviously don't cover this operation
  3. 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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.