Skip to main content
Glama

find_pattern_usage

Analyze code across multiple files to identify specific pattern usage with regex support and context analysis for understanding complex code and technical debt assessment.

Instructions

Find usage of specific patterns across multiple files in a project. Supports regex patterns with intelligent context analysis.

WORKFLOW: Perfect for understanding complex code, identifying issues, and technical debt assessment TIP: Use Desktop Commander to read files, then pass content here for analysis SAVES: Claude context for strategic decisions

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
analysisDepthNoLevel of analysis detaildetailed
analysisTypeNoType of analysis to performcomprehensive
codeNoThe code to analyze (for single-file analysis)
filePathNoPath to single file to analyze
filesNoArray of specific file paths (for multi-file analysis)
includeContextNoNumber of context lines to include (0-10)
languageNoProgramming languagejavascript
maxDepthNoMaximum directory depth for multi-file discovery (1-5)
patternsYesPatterns to search for (regex supported)
projectPathNoAbsolute path to project root directory
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 'intelligent context analysis' and 'SAVES: Claude context for strategic decisions,' which hints at caching or state retention, but it doesn't clarify critical behaviors like whether this is a read-only operation, if it modifies files, performance characteristics, or error handling. For a tool with 10 parameters and no annotations, this leaves significant gaps in understanding how the tool behaves.

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

Conciseness3/5

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

The description is structured with sections like 'WORKFLOW', 'TIP', and 'SAVES', which adds organization but includes some redundant or vague elements (e.g., 'SAVES: Claude context for strategic decisions' is unclear). It's moderately concise at 4 sentences, but phrases like 'Perfect for understanding complex code' could be more precise. Overall, it's adequately sized but not optimally front-loaded or waste-free.

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

Completeness2/5

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

Given the tool's complexity (10 parameters, no annotations, no output schema), the description is incomplete. It lacks details on behavioral traits (e.g., read/write nature, side effects), output format, error cases, and how it differs from siblings. While it covers basic purpose and some usage tips, it doesn't provide enough context for an agent to confidently invoke this tool without trial and error, especially for a multi-file analysis tool.

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

Parameters3/5

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

The schema description coverage is 100%, meaning all parameters are documented in the schema itself. The description adds minimal parameter semantics beyond the schema: it implies regex support for patterns and context analysis, but doesn't explain interactions between parameters (e.g., how 'code' vs. 'filePath' vs. 'files' are prioritized). Given the high schema coverage, a baseline score of 3 is appropriate, as the description doesn't significantly enhance parameter understanding.

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: 'Find usage of specific patterns across multiple files in a project. Supports regex patterns with intelligent context analysis.' This specifies the verb ('find'), resource ('usage of specific patterns'), and scope ('across multiple files in a project'). However, it doesn't explicitly differentiate from sibling tools like 'analyze_single_file' or 'analyze_project_structure', which reduces the score from a 5.

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

Usage Guidelines3/5

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

The description provides some implied usage guidance: 'Perfect for understanding complex code, identifying issues, and technical debt assessment' and 'Use Desktop Commander to read files, then pass content here for analysis.' This suggests contexts like code analysis and technical debt, but it doesn't explicitly state when to use this tool versus alternatives (e.g., 'analyze_single_file' for single files or 'analyze_code_quality' for broader quality checks). The guidance is helpful but not comprehensive.

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

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/houtini-ai/houtini-lm'

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