Skip to main content
Glama

Update Diagram

update_diagram

Update an existing CodePic diagram. You can rename it, replace all nodes/edges, or add/remove individual nodes and edges. Requires API Key authentication.

When responding to the user, present the returned URL as a clickable markdown link (e.g. [Open in CodePic →](URL)) so the user can click it directly in their AI client (Cursor / Claude / etc.).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoNew document name
edgesNoFull replacement of all edges
nodesNoFull replacement of all nodes. If provided, replaces the entire canvas content.
addEdgesNoEdges to add
addNodesNoNodes to add (without replacing existing ones)
documentIdYesDocument ID to update (from a previous create call)
removeEdgeIdsNoIDs of edges to remove
removeNodeIdsNoIDs of nodes to remove
backgroundColorNoNew canvas background color

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses the mutating behaviors (rename, full replacement, add/remove) and the prerequisite (API Key auth), and includes the non-obvious instruction to present returned URLs as clickable markdown links. It does not fully detail destructive side effects such as passing `nodes` deleting existing nodes, but 'replace all' plus the schema's 'full replacement' note mitigate the gap.

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 compact and front-loaded with core update semantics, then adds auth and response-formatting instructions. The markdown-link sentence is a bit verbose with client examples, but every part is purposeful; minor redundancy keeps it from a perfect score.

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

Completeness4/5

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

For a complex mutation tool with no output schema, the description covers the key invocation facts: what operations are possible, that API Key auth is required, and what to do with the returned URL. The long parameter-level details are delegated to the schema, so nothing critical is missing for an agent to call it correctly.

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 description coverage is very high, with detailed explanations for nodes, edges, data, type, and other fields. The description only summarizes high-level modes (rename/replace/add/remove) without adding parameter formats or constraints, so it sits at the baseline of 3 for a schema-heavy definition.

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 uses a specific verb ('Update'), names the resource ('existing CodePic diagram'), and clearly enumerates the operation modes (rename, replace all nodes/edges, add/remove individual nodes/edges). This distinguishes it from siblings like create_diagram and get_diagram by scoping it to mutations of an existing artifact.

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 phrase 'existing' implies this is the tool to call after a diagram has been created, but it never explicitly contrasts it with create_diagram/get_diagram or states 'use create_diagram to make a new one'. The response-formatting instruction is useful guidance but not about tool selection, so usage guidance remains implied rather than explicit.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A4.4/5.0
Disambiguation5/5

Each tool has a distinct purpose: create, get, update, list templates, and get shape documentation. No overlapping or ambiguous functions.

Naming Consistency5/5

All tool names follow a clear verb_noun pattern (create_diagram, get_diagram, get_shape_docs, list_templates, update_diagram), with consistent use of underscores and action-first naming.

Tool Count5/5

The tool count (5 listed, though count says 6) is well within the typical 3–15 range for this domain, providing a focused set without unnecessary bloat.

Completeness3/5

The set covers create, read, and update operations, but lacks a delete tool and a way to list all diagrams (only templates are listed). This leaves gaps in the lifecycle coverage, though the core diagram creation workflow is supported.