Skip to main content
Glama

Auto-Optimize Rack Equipment Layout Deterministically

optimize_rack
Idempotent

Optimizes top-level rackmount U positions and rear PDU face assignments to eliminate chassis and plug-clearance collisions, lower center of gravity, preserve cable portals, and shorten cable routing.

Instructions

Deterministically optimize top-level rackmount equipment U positions and rear PDU face assignments to eliminate chassis or plug-clearance collisions, lower the vertical Center of Gravity below 0.50, preserve mid-height front-to-rear cable portals, and minimize 3D cable arc lengths. Evaluates candidate zoned and locally refined layouts against the full 3D geometry, 5-stage validation, and Catmull-Rom routing engines while keeping carrier sub-modules inside their parent bays, keeping existing cables and external endpoints intact, and locking any devices or parent carriers named in 'pin_instance_ids'. Only commits a strictly improving, non-regressing layout to rack.yaml and pushes an undo snapshot when at least one device moves, making repeated calls safely idempotent. Use when a rack has collisions, top-heavy warnings, or unclustered patch cabling; use modify_equipment instead to move a single device to an explicit U slot.

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": "optimize_rack"
  }
}

Input Schema

NameRequiredDescriptionDefault
pin_instance_idsNoOptional list of mounted device or child sub-module instance_id values whose current U position and rack face must remain locked during optimization.

Output Schema

NameRequiredDescriptionDefault
dataYesDeterministic rack auto-optimization result payload.
issuesYesStructured diagnostic findings (ERROR, WARNING, INFO) with actionable remediation_suggestions.
statusYesDeterministic execution outcome: "VALID" when the operation succeeded with 0 validation errors; "INVALID" when precondition or engineering validation errors are present in issues[].
summaryYesConcise human- and agent-readable summary of the tool result and validation status.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.0.1

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only declare readOnly=false, idempotent=true and destructive=false; the description adds far more — that only a strictly improving, non-regressing layout is committed to rack.yaml, an undo snapshot is pushed when a device moves, and existing cables/external endpoints are preserved. This materially informs an agent about side effects, mutation scope, and idempotency conditions beyond the structured hints.

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?

Front-loads the core action and objectives, then transitions to safety semantics and the sibling alternative in a logical order with no filler. It is dense and a single long paragraph, which slightly reduces scanability for a definition of this length.

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, multi-subsystem mutation tool this covers what changes, what is protected, commit/rollback semantics, and idempotency; an output schema exists so return values need not be explained. Nothing an agent needs in order to invoke it correctly appears to be missing.

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 100%, so the baseline is 3; the description only restates that devices and parent carriers named in 'pin_instance_ids' stay locked. The added clarification that parent carriers can be pinned is a small nudge over the schema rather than new syntax or format detail.

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?

States a specific verb ('optimize') and resource ('top-level rackmount equipment U positions and rear PDU face assignments') and enumerates concrete objectives (collision removal, CoG below 0.50, preserving portals, minimizing cable arcs). It explicitly distinguishes itself from modify_equipment, so an agent can separate the two without reading either schema.

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

Usage Guidelines5/5

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

Gives an explicit trigger set ('when a rack has collisions, top-heavy warnings, or unclustered patch cabling') and names the alternative with the condition that selects it ('use modify_equipment instead to move a single device to an explicit U slot'). The when/when-not decision is fully specified.

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