Skip to main content
Glama

find_component_usages

Find all JSX usages of a component across the codebase. Supports filtering by props, patterns, conditional rendering, and parent components for precise analysis.

Instructions

Find all JSX usages of a component across the codebase. Returns summary (totalUsages, filesCount), distribution by path, and limited usages with detailed prop info. Supports filtering by props (withProp, withoutProp, withPropValue), patterns (hasInlineHandler, hasSpreadProps), and conditional rendering.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMax usages to return (default: 10, max: 50)
excludeNoFile patterns to exclude (default: ["**/node_modules/**"])
includeNoFile patterns to include (default: ["**/*.tsx", "**/*.jsx"])
filePathNoFilter to specific file or folder path (e.g., "src/app/sections/")
withPropNoOnly usages that have this prop (e.g., "onClick", "disabled")
projectPathYesRoot path of the project (must contain tsconfig.json or source files)
withoutPropNoOnly usages that do NOT have this prop
componentNameYesComponent name to search for (e.g., "Button", "DataGrid")
withPropValueNoOnly usages where prop has specific value (e.g., variant="danger")
hasSpreadPropsNoFilter by presence of spread props (e.g., {...props})
onlyConditionalNoOnly usages inside conditional expressions (ternary, &&, etc.)
parentComponentNoFilter to usages within specific parent component
hasInlineHandlerNoFilter by presence of inline arrow function handlers (e.g., onClick={() => ...})
includeExportChainNoInclude component definition and export chain (default: false)
Behavior4/5

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

No annotations are provided, so the description carries the transparency burden. It discloses the output format (summary, distribution, limited usages) and the filter categories, which gives a good sense of behavior. 'Find' implies a non-mutating operation, though it doesn't explicitly confirm read-only or performance implications.

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 concise, front-loaded with the primary purpose, and packs return shape and filter categories into just three sentences. Every sentence adds value without redundancy.

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 complex tool with no output schema, the description covers the main return values and filter types, which is helpful. However, it doesn't explain how multiple filters interact (AND/OR) or the meaning of 'limited' usages regarding the limit parameter, leaving some gap for accurate invocation.

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 already provides full descriptions for all 14 parameters, so the description adds little beyond grouping filters (props, patterns, conditional rendering). This is adequate but doesn't transcend the schema's coverage, matching the baseline for 100% schema coverage.

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?

The description opens with 'Find all JSX usages of a component across the codebase', which is a specific verb and resource. It clearly distinguishes from sibling tools like find_hook_usages or analyze_imports by focusing on JSX component usage and enumerating the return structure.

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

Usage Guidelines4/5

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

The description implies when to use the tool by stating its core capability and listing the available filters, which helps target searches. However, it does not explicitly mention alternatives or exclude scenarios, so it doesn't fully cover when-not-to-use guidance.

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/paramhq/tsx-query'

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