Skip to main content
Glama

Swap an operator's type in place

swap_operator
Destructive

Replace an operator's type while preserving its wiring and parameters. Reapplies matching params and reconnects inputs/outputs; per-item failures are reported instead of aborting.

Instructions

Change an operator's TYPE while preserving its name, position, incoming + outgoing wires, and any parameters that exist on the new type. Snapshots wires + params, deletes the old node, creates a new node of new_type at the same parent/name/x/y, re-applies matching params (others go into dropped_parameters), and rewires connectors. Fail-forward: per-wire / per-param failures are reported as failed_inputs[] / failed_outputs[] / dropped_parameters[] rather than aborting. Returns {old_type, new_path, preserved_parameters, dropped_parameters, reconnected_inputs, reconnected_outputs, failed_inputs, failed_outputs, warnings}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
new_typeYesNew operator type, e.g. 'rampTOP', 'constantCHOP'.
node_pathYesPath of the node to swap (e.g. '/project1/noise1').
preserve_parametersNoRe-apply parameters that exist (by name) on the new type.
Behavior5/5

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

The description goes far beyond the destructiveHint annotation by detailing the internal procedure: snapshots wires+params, deletes old node, creates new node, re-applies params, rewires connectors. It also discloses fail-forward behavior and return fields, providing a rich behavioral model not covered by annotations.

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 dense but well-structured: core action, procedure, failure handling, and return value are each given a sentence. Every sentence contributes essential information for a complex destructive operation.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is complex and has no output schema, but the description explains the full lifecycle and return structure including failed_inputs/outputs and warnings. This is sufficient for an agent to understand what will happen and interpret results.

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?

All 3 parameters have schema descriptions (100% coverage), so the baseline is 3. The description reinforces preserve_parameters behavior but adds no new syntactic details beyond the schema; it mentions parameter preservation and dropped_parameters in the return context.

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 opens with a specific verb+resource: 'Change an operator's TYPE while preserving its name, position, incoming + outgoing wires, and any parameters that exist on the new type.' This clearly distinguishes it from sibling create/delete/update tools by emphasizing in-place type swap with preservation.

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 the use case—when you need to change an operator's type without losing connections—but does not explicitly name alternatives or state when not to use it. It lacks comparative guidance like 'use this instead of delete+create'.

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/lucasmaher-hash/touch-designer-mcp'

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