Skip to main content
Glama
wrale

mcp-server-tree-sitter

by wrale

find_text

Search for specific text patterns within project files using customizable filters like file type, regex, case sensitivity, and whole-word matching. Supports context lines for better result understanding.

Instructions

Search for text pattern in project files.

    Args:
        project: Project name
        pattern: Text pattern to search for
        file_pattern: Optional glob pattern (e.g., "**/*.py")
        max_results: Maximum number of results
        case_sensitive: Whether to do case-sensitive matching
        whole_word: Whether to match whole words only
        use_regex: Whether to treat pattern as a regular expression
        context_lines: Number of context lines to include

    Returns:
        List of matches with file, line number, and text
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
case_sensitiveNo
context_linesNo
file_patternNo
max_resultsNo
patternYes
projectYes
use_regexNo
whole_wordNo
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions the action ('search') and return format ('List of matches with file, line number, and text'), but lacks details on performance (e.g., speed, rate limits), error handling, or side effects (e.g., whether it modifies files). For a tool with 8 parameters and no annotations, this is insufficient.

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

Conciseness5/5

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

The description is well-structured and concise, with a clear purpose statement followed by parameter details in a formatted list. Every sentence adds value, and it's front-loaded with the main action. There's no unnecessary information, making it efficient for quick understanding.

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

Completeness3/5

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

Given the complexity (8 parameters, no annotations, no output schema), the description is moderately complete. It covers the purpose and parameters but lacks behavioral context and output details beyond a high-level return statement. For a search tool, more information on result format or limitations would enhance completeness.

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?

The description lists all 8 parameters with brief explanations, adding meaning beyond the input schema, which has 0% description coverage. For example, it clarifies 'file_pattern' as 'Optional glob pattern (e.g., "**/*.py")' and 'context_lines' as 'Number of context lines to include'. This compensates well for the schema's lack of descriptions, though it could be more detailed on usage.

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

Purpose4/5

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

The description clearly states the tool's purpose: 'Search for text pattern in project files.' It specifies the verb ('search') and resource ('text pattern in project files'), making it easy to understand. However, it doesn't explicitly differentiate from sibling tools like 'find_similar_code' or 'find_usage', which might also involve searching, so it doesn't reach the highest score.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools or contexts where this search is preferred over others, such as 'find_similar_code' or 'find_usage'. Without such guidance, users might struggle to select the right tool.

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

Install Server

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/wrale/mcp-server-tree-sitter'

If you have feedback or need assistance with the MCP directory API, please join our Discord server