Skip to main content
Glama

Rebuild network from a spec

rebuild_network
Destructive

Rebuild a network inside a COMP from a JSON spec, creating nodes, applying parameters, and wiring inputs. Missing or unknown elements become warnings, so a partial reconstruction still returns useful results.

Instructions

Reconstruct a live network inside a COMP from a serialize_network spec — the REBUILD half of a git-diffable round-trip. Takes a JSON spec of nodes (name, operator type, parameters as constants/expressions/binds, inbound wires by name, optional x/y) and, in one pass, creates every node, applies its parameters and expressions, then wires inputs by resolving each from reference to the freshly created node. Fail-forward: an unknown operator type, missing parameter, or unresolved wire becomes a warning and the rest still build, so a partial reconstruction still returns useful results. Set clear_existing to delete the parent's current children first (destructive). Set auto_layout to auto-position every node by dependency (longest-path columns, left→right) from the spec's inputs graph, overriding any manual x/y. Returns the created node names, wire count, parameters set, and any warnings.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
specYesA serialize_network spec to reconstruct.
auto_layoutNoAuto-position every node by dependency (longest-path columns, left→right) from the spec's `inputs` graph, overriding any per-node x/y. False (default) honors manual x/y only.
parent_pathYesCOMP to rebuild the network inside.
clear_existingNoDelete existing children of parent_path first (destructive).
Behavior4/5

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

The description discloses the destructive clear_existing option and explains the fail-forward behavior (unknown operator, missing parameter, or unresolved wire become warnings). These specifics go beyond the annotations, which only broadly indicate non-read-only and destructive behavior, adding valuable context about failure handling and side effects.

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 efficient, with each sentence covering a distinct aspect: purpose, process, failure mode, option effects, and return values. There is no redundancy, and the structure is front-loaded with the core purpose.

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?

For a complex tool with a nested spec and no output schema, the description is remarkably complete. It specifies the return values (node names, wire count, parameters set, warnings), explains error handling, and describes the behavior of both optional flags. This makes it self-sufficient for correct invocation.

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?

Although the schema covers all parameters, the description adds meaning by explaining how the spec's nested structure (nodes, params, wires) is used during the rebuild process (one-pass creation, wiring by name). This helps the agent understand the relationship between parameters and the tool's operation, going beyond raw schema definitions.

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 reconstructs a live network from a serialize_network spec, identifying it as the 'REBUILD half of a git-diffable round-trip.' It distinguishes itself from sibling tools like serialize_network and create_td_node by explicitly focusing on whole-network reconstruction from a spec.

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?

It provides clear context for when to use the tool: as a counterpart to serialize_network for round-trip workflows. It also mentions fail-forward behavior, implying usefulness with partial specs. However, it does not explicitly exclude alternatives like repair_network or create_td_node, though the round-trip framing is strong.

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