Skip to main content
Glama
wonderwhy-er

Claude Desktop Commander MCP

by wonderwhy-er

start_search

Read-only

Start a streaming search that can return results progressively.

Instructions

                    Start a streaming search that can return results progressively.
                    
                    SEARCH STRATEGY GUIDE:
                    Choose the right search type based on what the user is looking for:
                    
                    USE searchType="files" WHEN:
                    - User asks for specific files: "find package.json", "locate config files"
                    - Pattern looks like a filename: "*.js", "README.md", "test-*.tsx" 
                    - User wants to find files by name/extension: "all TypeScript files", "Python scripts"
                    - Looking for configuration/setup files: ".env", "dockerfile", "tsconfig.json"
                    
                    USE searchType="content" WHEN:
                    - User asks about code/logic: "authentication logic", "error handling", "API calls"
                    - Looking for functions/variables: "getUserData function", "useState hook"
                    - Searching for text/comments: "TODO items", "FIXME comments", "documentation"
                    - Finding patterns in code: "console.log statements", "import statements"
                    - User describes functionality: "components that handle login", "files with database queries"
                    
                    AMBIGUOUS SEARCHES:
                    Queries that could refer to either filenames or file contents can be covered with two
                    searches: one with searchType="files" and one with searchType="content".
                    Example: "find authentication stuff" can pair a filename search for "auth" with a
                    content search for "authentication".
                    
                    SEARCH TYPES:
                    - searchType="files": Find files by name (pattern matches file names)
                    - searchType="content": Search inside files for text patterns
                    
                    PATTERN MATCHING MODES:
                    - Default (literalSearch=false): Patterns are treated as regular expressions
                    - Literal (literalSearch=true): Patterns are treated as exact strings
                    
                    literalSearch=true is useful for code patterns with special characters:
                    - Function calls with parentheses and quotes
                    - Array access with brackets
                    - Object methods with dots and parentheses
                    - File paths with backslashes
                    - Any pattern containing: . * + ? ^ $ { } [ ] | \ ( )
                    
                    IMPORTANT PARAMETERS:
                    - pattern: What to search for (file names OR content text)
                    - literalSearch: Use exact string matching instead of regex (default: false)
                    - filePattern: Optional filter to limit search to specific file types (e.g., "*.js", "package.json")
                    - ignoreCase: Case-insensitive search (default: true). Works for both file names and content.
                    - earlyTermination: Stop search early when exact filename match is found (optional: defaults to true for file searches, false for content searches)
                    
                    DECISION EXAMPLES:
                    - "find package.json" → searchType="files", pattern="package.json" (specific file)
                    - "find authentication components" → searchType="content", pattern="authentication" (looking for functionality)
                    - "locate all React components" → searchType="files", pattern="*.tsx" or "*.jsx" (file pattern)
                    - "find TODO comments" → searchType="content", pattern="TODO" (text in files)
                    - "show me login files" → AMBIGUOUS → run both: files with "login" AND content with "login"
                    - "find config" → AMBIGUOUS → run both: config files AND files containing config code
                    
                    COMPREHENSIVE SEARCH EXAMPLES:
                    - Find package.json files: searchType="files", pattern="package.json"
                    - Find all JS files: searchType="files", pattern="*.js"
                    - Search for TODO in code: searchType="content", pattern="TODO", filePattern="*.js|*.ts"
                    - Search for exact code: searchType="content", pattern="toast.error('test')", literalSearch=true
                    - Ambiguous request "find auth stuff": Run two searches:
                      1. searchType="files", pattern="auth"
                      2. searchType="content", pattern="authentication"
                    
                    Ambiguous requests can combine file-name and content searches for broader coverage.
                    
                    This tool starts a background search process and returns immediately with a session ID.
                    Results are available through get_more_search_results, and stop_search can end the search early.
                    
                    Perfect for large directories where you want to see results immediately and
                    have the option to cancel if the search takes too long or you find what you need.
                    
                    Absolute paths are the most reliable because they do not depend on the current working directory. Paths are automatically normalized regardless of slash direction. Relative paths depend on the current working directory, and tilde paths (~/...) may not resolve in every context. Absolute paths are generally the most reliable.
                    This command can be referenced as "DC: ..." or "use Desktop Commander to ..." in your instructions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
originNo
patternYes
ignoreCaseNo
maxResultsNo
searchTypeNofiles
timeout_msNo
filePatternNo
contextLinesNo
includeHiddenNo
literalSearchNo
earlyTerminationNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv0.3.0
    • addedInput schema / properties / contextLines / minimum
      Added value: +0
    • changedInput schema / properties / contextLines / type
      Previous value: -"number"New value: +"integer"
    • addedInput schema / properties / maxResults / minimum
      Added value: +0
    • changedInput schema / properties / maxResults / type
      Previous value: -"number"New value: +"integer"
    • addedInput schema / properties / timeout_ms / minimum
      Added value: +0
    • changedInput schema / properties / timeout_ms / type
      Previous value: -"number"New value: +"integer"
  2. Changed1 schema field changedv0.2.44
    • addedInput schema / properties / origin
      Added value: +{
      +  "enum": [
      +    "ui",
      +    "llm"
      +  ],
      +  "type": "string"
      +}
  3. Addedv0.2.17

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnly/non-destructive/closed-world, so the safety bar is covered. The description adds genuine lifecycle context: it starts a background process, returns immediately with a session ID, results flow through a sibling, and it can be cancelled. Path normalization/tilde-resolution caveats are also disclosed. It does not state timeout or maxResults behavior, keeping it below 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose is front-loaded, but the body is heavily redundant: 'DECISION EXAMPLES', 'COMPREHENSIVE SEARCH EXAMPLES', and the closing paragraphs repeat the same file/content selection rules several times. A large fraction of the text does not earn its place against what a shorter guide would convey.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a session-based streaming tool with no output schema, the description adequately explains the async lifecycle, where results appear, and how to cancel. It is complete enough to invoke correctly; only the unmentioned tuning parameters (timeout_ms, maxResults) leave minor gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description carries the full burden, and it meaningfully documents the core params: pattern, searchType, literalSearch, filePattern, ignoreCase, earlyTermination, plus path reliability. However several params (maxResults, timeout_ms, contextLines, includeHidden, origin) receive no explanation, leaving real gaps.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource (start a streaming search returning results progressively), and explicitly names the sibling tools that continue/cancel it (get_more_search_results, stop_search). An agent can tell it apart from list_searches and other siblings without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides an exhaustive when-to-use guide: explicit rules for choosing searchType='files' vs 'content', an ambiguity protocol (run both), and worked decision examples. This is far beyond typical routing guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.