Skip to main content
Glama
MCP Design System Extractor

MCP Design System Extractor

get_component_dependencies

Analyzes rendered HTML to identify React components, web components, and CSS class patterns a given component uses, helping you map internal dependencies for refactoring.

Instructions

Analyze rendered HTML to find which other components a given component internally uses by detecting React components, web components, and CSS class patterns

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "componentId": "<componentId>"
    },
    "name": "get_component_dependencies"
  }
}

Input Schema

NameRequiredDescriptionDefault
componentIdYesThe story ID of the component (e.g., "example-button--primary")

Output Schema

NameRequiredDescriptionDefault
storyIdYes
dependenciesYes
externalComponentsYesComponents matching a known library prefix (Mui, Ant, Bootstrap, ...)
internalComponentsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.3.0
  2. Removedv1.2.0
  3. First observed

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It usefully discloses that detection is heuristic — based on React components, web components, and CSS class patterns — which signals results may be pattern-based rather than exhaustive. It omits whether the HTML is fetched fresh or cached, whether transitive dependencies are included, and what happens when no patterns match.

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

Conciseness4/5

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

A single dense sentence with the action verb front-loaded and no filler. The list of detection techniques is the only length expansion, and it earns its place by conveying method. Slightly overpacked but efficient.

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?

An output schema exists, so return-value explanation is unnecessary, and the single required parameter is fully documented in the schema. What remains missing is behavioral context an agent would want for a heuristic analysis tool: whether detection is limited to same-library components and how misses are reported. Adequate but with clear gaps against the tool's analytical, non-obvious nature.

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?

Schema description coverage is 100%; the single parameter is documented as the story ID with an example. The description adds only the framing "a given component," which does not clarify the ID format or behavior further. Baseline 3 applies since the schema does the heavy lifting.

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 pairs a specific verb ("Analyze") with a specific resource ("which other components a given component internally uses") and even specifies the detection mechanisms (React components, web components, CSS class patterns). It is clearly distinct from get_component_html, which retrieves markup rather than deriving relationships. It stops short of explicitly naming that sibling, so no credit for direct differentiation.

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?

Usage is implied by the purpose: call this when you need to know what a component depends on. However, there is no explicit when-to-use framing, no when-not-to-use cases, and no named alternative among the siblings (e.g., search_components for reverse lookups). The agent must infer the selection condition.

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