Skip to main content
Glama
grandMA2 MCP
by drohi-r

assert_preset_exists

Verify a preset slot exists in the snapshot pool inventory before storing presets or cues. Uses the name index for a zero-telnet pre-flight check.

Instructions

    Assert that a preset slot exists in the snapshot's pool inventory.

    Pre-flight check before store_preset or store_cue. Reads from snapshot
    name index — zero telnet cost.

    Args:
        preset_type: PresetType ID (1=Dimmer, 2=Position, 3=Gobo, 4=Color,
                     5=Beam, 6=Focus, 7=Control).
        preset_id: The preset slot ID to check.

    Returns:
        str: JSON with exists bool, preset_type, preset_id, and optional warning.
    

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": {
      "preset_type": "<preset_type>",
      "preset_id": "<preset_id>"
    },
    "name": "assert_preset_exists"
  }
}

Input Schema

NameRequiredDescriptionDefault
preset_idYes
preset_typeYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: 'Reads from snapshot name index — zero telnet cost' discloses that this is a local, offline read with no device I/O. It also names the return payload shape including an optional warning, but does not explain what triggers that warning or what a snapshot dependency means if none is loaded.

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 one-line purpose, then uses conventional Args/Returns sections. The indentation and section labels are slightly verbose for a two-parameter tool, but every sentence carries usable information.

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 simple two-parameter read-only assertion with an output schema present, the description covers purpose, precondition context, parameter value mapping, and return shape. The only gap is the semantics of the optional 'warning' field, which the output schema may partially cover.

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 coverage is 0% — both parameters are bare integers in the schema — so the description must compensate, and it does by enumerating all seven PresetType IDs (1=Dimmer through 7=Control) and describing preset_id as the slot to check. It stops short of stating valid ranges or error behavior for out-of-range IDs.

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?

States a specific verb and resource: 'Assert that a preset slot exists in the snapshot's pool inventory.' It also frames the tool relative to store operations, which separates it from mutation siblings, though it does not explicitly contrast with the other assert_* tools.

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?

'Pre-flight check before store_preset or store_cue' gives a concrete when-to-use condition and implicitly defines the alternative workflow. No explicit when-not-to-use or exclusions are given, which keeps it below a 5.

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