Skip to main content
Glama
Lars-Albinsson

playwright-react-debug-mcp

collect_component_instances

Collect all instances of a React component with props and HTML mapping to compare usages, understand behavior, and extract patterns.

Instructions

Collect all instances of a React component type with props→HTML mapping. Useful for understanding component behavior, comparing different usages, or extracting component patterns. Returns props, rendered HTML, and minified source for each instance.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoComponent name to search for (case-insensitive). If omitted, collects all components.
maxInstancesNoMaximum instances to collect per component type (default: 20)
Behavior3/5

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

With no annotations, the description carries the full burden for behavioral disclosure. It states what the tool returns ('props, rendered HTML, and minified source for each instance') and implies a read-only nature through 'collect' and 'returns.' However, it does not explicitly state that it is safe/read-only or mention any performance caveats for large React apps, leaving some ambiguity about side effects and resource usage.

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, using only two sentences. The first sentence front-loads the core functionality and mapping, and the second succinctly lists use cases and return contents. There is no redundant or filler language.

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?

Given the tool's moderate complexity and the absence of an output schema, the description adequately covers return values ('props, rendered HTML, and minified source') and use cases. It omits potential edge cases (e.g., component not found) and does not elaborate on the data structure, but the schema handles the parameter details. This is sufficiently complete for an agent to understand the tool's purpose and basic behavior.

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 input schema provides full descriptions for both parameters (name and maxInstances), achieving 100% coverage. The description adds no extra parameter-level detail, so it stays at the baseline of 3 without exceeding it.

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 clearly states the action ('Collect all instances of a React component type') and specifies the unique value proposition ('props→HTML mapping'), setting it apart from sibling tools like find_component or get_react_tree. The use cases ('understanding component behavior, comparing different usages, or extracting component patterns') further clarify its distinct purpose.

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 provides explicit use cases: 'understanding component behavior, comparing different usages, or extracting component patterns.' However, it does not name alternative tools or specify when not to use it, so it falls short of the full 5 for explicit exclusions and alternatives.

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/Lars-Albinsson/playwright-react-debug-mcp'

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