Skip to main content
Glama

auto_fix_layout

Diagnose and automatically repair Excalidraw layout defects including overlaps, connectors, spacing, containment, and text issues, with rollback-safe changes.

Instructions

Diagnose and automatically repair layout defects with rollback safety.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "auto_fix_layout"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNo
dry_runNo
min_gapNo
verboseNo
repair_scopeNoall
aggressivenessNobalanced

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.5.0
    • addedInput schema / properties / min_gap / maximum
      Added value: +1000
    • addedInput schema / properties / min_gap / minimum
      Added value: +0
  2. Changed2 schema fields changedv0.3.0
    • addedInput schema / properties / verbose
      Added value: +{
      +  "default": false,
      +  "type": "boolean"
      +}
    • changedOutput schema / (root)
      Previous value: -{
      -  "properties": {
      -    "applied_changes": {
      -      "items": {
      -        "properties": {
      -          "after": {
      -            "additionalProperties": true,
      -            "type": "object"
      -          },
      -          "before": {
      -            "additionalProperties": true,
      -            "type": "object"
      -          },
      -          "change_type": {
      -            "type": "string"
      -          },
      -          "description": {
      -            "type": "string"
      -          },
      -          "element_id": {
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "element_id",
      -          "change_type",
      -          "description"
      -        ],
      -        "type": "object"
      -      },
      -      "type": "array"
      -    },
      -    "changed_element_ids": {
      -      "items": {
      -        "type": "string"
      -      },
      -      "type": "array"
      -    },
      -    "dry_run": {
      -      "type": "boolean"
      -    },
      -    "final_issues": {
      -      "items": {
      -        "properties": {
      -          "description": {
      -            "type": "string"
      -          },
      -          "details": {
      -            "additionalProperties": true,
      -            "type": "object"
      -          },
      -          "element_ids": {
      -            "items": {
      -              "type": "string"
      -            },
      -            "type": "array"
      -          },
      -          "id": {
      -            "type": "string"
      -          },
      -          "severity": {
      -            "type": "string"
      -          },
      -          "type": {
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "id",
      -          "type",
      -          "severity",
      -          "element_ids",
      -          "description"
      -        ],
      -        "type": "object"
      -      },
      -      "type": "array"
      -    },
      -    "fixed_issues_count": {
      -      "type": "integer"
      -    },
      -    "initial_issues": {
      -      "items": {
      -        "properties": {
      -          "description": {
      -            "type": "string"
      -          },
      -          "details": {
      -            "additionalProperties": true,
      -            "type": "object"
      -          },
      -          "element_ids": {
      -            "items": {
      -              "type": "string"
      -            },
      -            "type": "array"
      -          },
      -          "id": {
      -            "type": "string"
      -          },
      -          "severity": {
      -            "type": "string"
      -          },
      -          "type": {
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "id",
      -          "type",
      -          "severity",
      -          "element_ids",
      -          "description"
      -        ],
      -        "type": "object"
      -      },
      -      "type": "array"
      -    },
      -    "planned_changes": {
      -      "items": {
      -        "additionalProperties": true,
      -        "type": "object"
      -      },
      -      "type": "array"
      -    },
      -    "revision": {
      -      "type": "integer"
      -    },
      -    "rolled_back": {
      -      "type": "boolean"
      -    },
      -    "skipped_repairs": {
      -      "items": {
      -        "additionalProperties": true,
      -        "type": "object"
      -      },
      -      "type": "array"
      -    },
      -    "status": {
      -      "type": "string"
      -    },
      -    "unresolved_issues": {
      -      "items": {
      -        "properties": {
      -          "description": {
      -            "type": "string"
      -          },
      -          "details": {
      -            "additionalProperties": true,
      -            "type": "object"
      -          },
      -          "element_ids": {
      -            "items": {
      -              "type": "string"
      -            },
      -            "type": "array"
      -          },
      -          "id": {
      -            "type": "string"
      -          },
      -          "severity": {
      -            "type": "string"
      -          },
      -          "type": {
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "id",
      -          "type",
      -          "severity",
      -          "element_ids",
      -          "description"
      -        ],
      -        "type": "object"
      -      },
      -      "type": "array"
      -    },
      -    "warnings": {
      -      "items": {
      -        "type": "string"
      -      },
      -      "type": "array"
      -    }
      -  },
      -  "required": [
      -    "status",
      -    "dry_run",
      -    "initial_issues",
      -    "final_issues",
      -    "fixed_issues_count",
      -    "unresolved_issues",
      -    "planned_changes",
      -    "applied_changes",
      -    "changed_element_ids",
      -    "skipped_repairs",
      -    "warnings",
      -    "rolled_back",
      -    "revision"
      -  ],
      -  "type": "object"
      -}New value: +null
  3. First observedv0.2.1

TDQS

C2.7/5.0
Behavior3/5

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

Annotations already declare destructiveHint=false and idempotentHint=false, so the safety profile is partly covered; the description adds the meaningful claim of 'rollback safety'. However, it never says what is mutated (the current scene? a named layout?), what the repair may change, or that dry_run exists to preview changes.

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?

One tight sentence, front-loaded with the action and zero filler. It is efficient but so terse that it omits nearly all operative detail relative to a six-parameter tool.

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

Completeness2/5

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

For a mutating tool with six undocumented parameters, no output schema, and multiple behavioral modes, the description is far too thin. It says nothing about scope of edits, what dry_run returns, or what a repair report looks like.

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

Parameters1/5

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

Schema description coverage is 0% across six parameters, so the description carries the full burden and adds nothing — no explanation of name, dry_run, min_gap, verbose, repair_scope, or aggressiveness. Notably repair_scope and aggressiveness are enums whose semantics ('gentle' vs 'aggressive', 'containment' vs 'spacing') are unexplained anywhere.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Specific verb pair ('diagnose and automatically repair') plus a specific object ('layout defects'), which distinguishes it from read-only siblings like inspect_scene or preview. It stops short of naming an alternative, but the action/scope is unambiguous.

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

Usage Guidelines2/5

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

No indication of when to reach for this versus inspect_scene (diagnose only) or preview (check before applying), and no mention of the dry_run path or undo as a safety alternative. The agent must infer the workflow entirely.

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