Skip to main content
Glama

diagram_relayout

DestructiveIdempotent

Recompute a diagram's stored node positions from scratch to restore a clean layered layout and fix a diagram dragged into a mess.

Instructions

Recompute a diagram's stored node positions from scratch.

Positions live in the store, not in a viewer, so every reader sees the same picture and positions hand-adjusted in the admin dashboard persist. This discards those adjustments and rebuilds the layered arrangement -- the fix for a diagram dragged into a mess.

Input Schema

NameRequiredDescriptionDefault
uidYesthe diagram.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.16.1
    • addedInput schema / properties / uid / description
      Added value: +"the diagram."
    • removedInput schema / properties / uid / title
      Removed value: -"Uid"
    • removedInput schema / title
      Removed value: -"diagram_relayoutArguments"
  2. Addedv0.1.1

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, but the description goes further by naming exactly what is destroyed: hand-adjusted positions stored server-side and edited in the admin dashboard. The explanation that positions live in the store rather than the viewer meaningfully explains the persistence model. It still says nothing about return shape, timing, or permissions.

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 action is front-loaded and there is no filler, but the middle sentence about store-vs-viewer persistence is a long clause whose job could be done more briefly. It earns most of its place by justifying the destructive warning.

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 one-parameter mutation with no output schema, the description covers what it does, what it overwrites, and when to reach for it. The only real gap is what the caller gets back or how to confirm the relayout succeeded.

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?

There is a single parameter (uid) and schema description coverage is 100%, so the schema already carries the meaning; the description adds no syntax, format, or identifier-source detail. Baseline 3 applies when structured fields do the work.

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 precise verb+resource: 'Recompute a diagram's stored node positions from scratch.' That is unmistakably different from siblings like get_diagram (read) or diagram_node/diagram_edge (sub-resource editing), so an agent can route correctly without inspecting another schema.

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 gives a clear usage context -- 'the fix for a diagram dragged into a mess' -- and implicitly cautions that manual adjustments will be lost, which steers the agent away from calling it casually. It stops short of naming when-not-to-use or an alternative tool, so it is not a full 5.

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