Skip to main content
Glama

coras_edit_diagram

Edit existing CORAS .dgx diagrams: add or remove elements and arrows, rename, recolor, or reposition items, and re-run layout while preserving manual positions. A backup copy is created.

Instructions

Change an existing .dgx file in place: add or remove elements and arrows, rename things, recolour, move, add or drop whole diagrams, or re-run the automatic layout. Existing positions are kept unless you ask for a relayout, and a .bak copy is made first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesThe .dgx file to change.
scaleNo
backupNoWrite a .bak copy (default true).
layoutNo'preserve' (default) keeps hand positions and only places new elements; 'auto' re-lays out every diagram that changed.
previewNoReturn an image (default true).
directionNo
operationsYesEdits, applied in order. Each has an 'op': add_node, add_edge, remove_node, remove_edge, rename, set, set_label, add_diagram, remove_diagram, rename_diagram, relayout. add_node takes the same fields as a node in coras_create_diagram; add_edge takes from/to/label/type/strategy; set takes id plus any of name, kind, color, font, x, y, width, height.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions that existing positions are kept unless a relayout is requested, and that a .bak copy is made first, which are key behavioral traits. It does not cover permissions, reversibility, or failure modes, but the core mutation behavior and safety net are disclosed.

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 concise, with two sentences that front-load the main action and then add key behavioral notes. Every sentence adds information without redundancy, making it efficient for an agent to parse quickly.

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?

The description covers the core functionality and key behaviors (preserving positions, backup), and the schema handles detailed parameters. It does not explicitly mention the preview/return image behavior or the ordered application of operations, but these are available in the schema. For a modification tool with this complexity, the context is adequate but not exhaustive.

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 71%, with descriptions for path, backup, layout, preview, and operations. The description adds little beyond what the schema already says about layout (preserve vs auto) and backup behavior. It does not elaborate on scale, direction, or operation specifics, so it provides marginal added value.

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 modifies an existing .dgx file in place, listing concrete operations like add/remove elements, rename, recolour, move, add/drop diagrams, and relayout. It distinguishes from siblings (create, read, render) by focusing on editing existing files. The verb 'change' is specific and resource is clear.

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 implies this tool is for editing existing diagrams, as opposed to creating new ones (coras_create_diagram). It states that positions are preserved unless a relayout is requested, giving context on when to use the layout option. However, it does not explicitly name alternatives or exclude cases like reading or rendering, so it lacks explicit when-not guidance.

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