Skip to main content
Glama
grandMA2 MCP
by drohi-r

build_layout_for_screen

Builds and optionally applies a grandMA2 screen layout from a template or custom content, with dry-run preview and destructive-write confirmation.

Instructions

Build (and optionally apply) a layout for one of the MA2 screens.

Either ``template`` or ``content`` must be supplied (not both).

Templates (per spec §B.2): ``busking-master`` | ``preset-access`` |
``executor-monitor`` | ``macro-page`` | ``programmer-view`` |
``troubleshoot-view``.

Args:
    screen: Target screen number (1-5 on a full console; 1 on onPC).
    content: Optional list of ContentSpec cells (mutually exclusive with template).
    template: Optional template name (mutually exclusive with content).
    dry_run: When True, build the plan but don't send any commands.
    confirm_destructive: Required for ``dry_run=False`` (layout writes overwrite
        screen content).

Returns:
    JSON envelope: ``{screen, template, plan, content, preview_ascii,
    expert_review, summary, dry_run, executed_steps, blocked}``.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "screen": "<screen>"
    },
    "name": "build_layout_for_screen"
  }
}

Input Schema

NameRequiredDescriptionDefault
screenYes
contentNo
dry_runNo
templateNo
confirm_destructiveNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.1/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 and does well: it discloses that layout writes overwrite screen content, that confirm_destructive gates non-dry-run execution, and that dry_run defaults to a plan-only build. It does not discuss permissions, irreversibility beyond the overwrite warning, or failure modes, which keeps it below 5.

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-loaded purpose followed by a constraint sentence and a well-organized Args block; each line carries information. The Returns block is somewhat redundant with the output schema but is compact enough to be useful rather than wasteful.

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 destructive-by-default-off mutation tool with five parameters and no annotations, the description covers the missing annotations' concerns (destructiveness, confirmation, dry-run), documents the enum-like template choices, and enumerates return fields. An agent has everything needed to call it correctly.

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

Parameters4/5

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

Schema description coverage is 0%, so the description must compensate, and it largely does: it gives screen ranges (1-5 on console, 1 on onPC), the mutual exclusion of content and template, dry_run meaning, and confirm_destructive conditions. It also enumerates template names, which the schema does not (template is an unconstrained string there). The ContentSpec cell structure is left vague, so not a full 5.

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?

The description opens with a specific verb and resource: 'Build (and optionally apply) a layout for one of the MA2 screens.' That is unambiguous and distinguishes it from siblings like scan_page_executor_layout or build_show_from_patch. It stops short of naming an alternative for comparison, which keeps it at 4 rather than 5.

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 operational precondition ('Either template or content must be supplied (not both)') and explains when confirm_destructive is required versus when dry_run applies. What is missing is explicit guidance on choosing between this tool and other build/scan siblings, but the internal when/how constraints are well stated.

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

Deploy Server

Other Tools