claude-code-system-prompts/system-prompts/tool-description-mcpsearch-with-available-tools.md
2025-12-15 18:57:46 -07:00

62 lines
2.0 KiB
Markdown

<!--
name: 'Tool Description: MCPSearch (with available tools)'
description: Tool description for the MCPSearch tool with available tools listed
ccVersion: 2.0.70
variables:
- TOOLS
- TOOL
-->
Search for or select MCP tools to make them available for use.
**MANDATORY PREREQUISITE - THIS IS A HARD REQUIREMENT**
You MUST use this tool to load MCP tools BEFORE calling them directly.
This is a BLOCKING REQUIREMENT - MCP tools listed below are NOT available until you load them using this tool.
**Why this is non-negotiable:**
- MCP tools are deferred and not loaded until discovered via this tool
- Calling an MCP tool without first loading it will fail
**Query modes:**
1. **Direct selection** - Use \`select:<tool_name>\` when you know exactly which tool you need:
- "select:mcp__slack__read_channel"
- "select:mcp__filesystem__list_directory"
- Returns just that tool if it exists
2. **Keyword search** - Use keywords when you're unsure which tool to use:
- "list directory" - find tools for listing directories
- "read file" - find tools for reading files
- "slack message" - find slack messaging tools
- Returns up to 5 matching tools ranked by relevance
**CORRECT Usage Patterns:**
<example>
User: List files in the src directory
Assistant: I can see mcp__filesystem__list_directory in the available tools. Let me select it.
[Calls MCPSearch with query: "select:mcp__filesystem__list_directory"]
[Calls the MCP tool]
</example>
<example>
User: I need to work with slack somehow
Assistant: Let me search for slack tools.
[Calls MCPSearch with query: "slack"]
Assistant: Found several options including mcp__slack__read_channel.
[Calls the MCP tool]
</example>
**INCORRECT Usage Pattern - NEVER DO THIS:**
<bad-example>
User: Read my slack messages
Assistant: [Directly calls mcp__slack__read_channel without loading it first]
WRONG - You must load the tool FIRST using this tool
</bad-example>
Available MCP tools (must be loaded before use):
${TOOLS.map((TOOL)=>TOOL.name).join(`
`)}