Skip to main content
Glama

save_component

Deterministically writes component code to the exact path, removes Figma node IDs, and auto-updates the index.ts barrel export.

Instructions

Deterministic write op: strip data-node-id, write to the exact path, and auto-update the index.ts barrel export.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYes
featureDirNo
projectRootYes
componentNameYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.1

TDQS

C2.9/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 burden, and it does disclose genuinely useful behavior: the operation is deterministic, mutates the code by stripping data-node-id, and has a side effect on the index.ts barrel. It stops short of stating whether an existing file is overwritten, how the path is resolved from projectRoot/featureDir/componentName, or what happens on failure.

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 front-loaded sentence that leads with the operation type and then enumerates the three effects, with no filler. It is efficient, though the terse style contributes to the gaps in parameter and usage detail.

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?

For a mutation tool with zero annotations, no output schema, and 0% parameter coverage, the description is too thin. It never explains path resolution, overwrite semantics, or the expected response, which an agent needs before performing a deterministic write that also edits a barrel file.

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

Parameters2/5

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

Schema description coverage is 0% and none of the four parameters (code, componentName, projectRoot, featureDir) is explained in the description. The phrase 'the exact path' hints that a path is derived but does not say from which parameters or in what combination, so the description fails to compensate for the coverage gap.

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 states a concrete write action with three specific behaviors: stripping data-node-id, writing to an exact path, and updating the index.ts barrel. An agent can tell this is the persistence step for a component file. It does not, however, name or contrast itself with any sibling (e.g., compile_figma_component or scan_components), so differentiation is left to inference.

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

Usage Guidelines2/5

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

There is no explicit when-to-use guidance, no prerequisites (does the component need to be compiled first?), and no mention of alternatives among the many siblings. The reader must infer from the name alone that this is the terminal save step in a component-generation pipeline.

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