Skip to main content
Glama

Swap an operator's type in place

swap_operator
Destructive

Change an operator's type while preserving its name, position, wires, and matching parameters. Reports per-wire and per-param failures without 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
node_pathYesPath of the node to swap (e.g. '/project1/noise1').
new_typeYesNew operator type, e.g. 'rampTOP', 'constantCHOP'.
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 provides extensive behavioral details beyond annotations: snapshots wires and parameters, deletes old node, creates new, re-applies matching parameters, and fail-forward error reporting with specific return fields. This fully informs the agent of the tool's effects.

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?

The description is detailed but efficient, listing steps and return fields without extraneous text. It could be slightly more concise, but each sentence contributes useful information.

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?

Despite having no output schema, the description thoroughly explains all return fields and the fail-forward approach. It covers mutation and destructive behavior comprehensively, making the tool's behavior clear.

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

Parameters4/5

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

The input schema already describes parameters with full coverage. The description adds valuable context about how parameters are re-applied (matching by name) and that others go into dropped_parameters, enhancing understanding.

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 that the tool changes an operator's type while preserving name, position, wires, and matching parameters. It distinguishes itself from related operations like deleting and recreating nodes.

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

Usage Guidelines4/5

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

The description implicitly indicates when to use this tool (to change type without losing connectivity) but does not explicitly mention when not to use it or provide alternative tools like delete_td_node or create_td_node.

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/Pantani/tdmcp'

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