Skip to main content
Glama

swap_component

Destructive

Replace an instance node's main component with a different component while maintaining its position and size.

Instructions

Swap the main component of an existing INSTANCE node, replacing it with a different component while keeping position and size.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nodeIdYesINSTANCE node ID in colon format e.g. 4029:12345
componentIdYesTarget COMPONENT node ID in colon format (from get_local_components)
Behavior3/5

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

Annotations indicate destructiveHint=true, and the description adds that position and size are preserved. However, it does not disclose other behavioral aspects such as whether instance overrides are maintained, or what happens to the old component. It adds some value beyond annotations but is incomplete.

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 a single sentence that is front-loaded with the verb and resource. No redundant information; every word earns its place.

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?

Given the simplicity of the tool and the presence of annotations, the description provides adequate context for basic usage. However, it lacks information about return value or side effects on other nodes, which would be helpful for a destructive operation.

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 coverage is 100% with clear descriptions for both parameters. The description provides minor additional context by referencing 'get_local_components' as the source for componentId, but does not significantly enhance understanding beyond the schema.

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 (swap), the resource (main component of INSTANCE node), and the preservation of position and size. It distinguishes from siblings like detach_instance or create_component.

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?

The description provides no guidance on when to use this tool versus alternatives, nor does it specify prerequisites or when not to use it. The only hint is the parameter description mentioning 'from get_local_components', but this is in the schema, not the main description.

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/vkhanhqui/figma-mcp-go'

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