Skip to main content
Glama
jamcgrath

svelte-component-graph-mcp

by jamcgrath

Get one component

get_component

Retrieve a Svelte component's dependency graph details by path: parents, children, route/unused status, and Svelte 5 props and slots.

Instructions

Look up a single component or route by its workspace-relative path (e.g. "src/lib/Button.svelte"). Returns its parents (components that import it), children (components it imports), whether it is unused/a route, and its Svelte 5 public API surface: props (name, optional, bindable, rest) and slots.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesWorkspace-relative path to the component, e.g. "src/lib/Button.svelte".
rootYesAbsolute path to the SvelteKit/Svelte project root to analyze.
Behavior4/5

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

With no annotations provided, the description takes on the full burden of behavioral disclosure. It explains not only that the tool retrieves a component but also details the exact information returned: parents, children, unused/route status, and Svelte 5 API surface (props and slots). This goes beyond a basic 'get' and gives the agent a clear model of the tool's output, though it does not mention error handling or performance characteristics.

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 two sentences: the first states the core purpose with an example, and the second enumerates the return value components. There is no redundancy or filler, and the most important information is front-loaded.

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 there is no output schema, the description does a good job of explaining what the tool returns, listing parents, children, unused/route status, props, and slots. It could be more detailed about the structure of those return values (e.g., whether parents are paths or names), but the main categories are covered, making it sufficiently complete for an agent to select and invoke the 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 input schema already describes both parameters (path and root) with clear descriptions and an example, yielding 100% schema coverage. The description adds no additional parameter meaning beyond restating what the schema provides, so the baseline of 3 is appropriate.

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 tool's function: 'Look up a single component or route by its workspace-relative path'. It specifies the resource (component or route), the identifying method (path), and provides an example. This distinguishes it from sibling tools like get_graph, get_unused, and get_routes, which target different scopes or queries.

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 implies its use case—when you need details about a single specific component—but it does not explicitly mention when to use it over alternatives or provide exclusions. Sibling tools exist, but the description does not reference them, leaving the agent to infer the appropriate context.

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/jamcgrath/svelte-component-graph-mcp'

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