Skip to main content
Glama

add_script

Idempotent

Adds a whole stack of blocks to an mBlock project from a file, starting with a hat. Handles substacks, shadows, and parent/next links to place scripts correctly.

Instructions

Put a whole stack of blocks at once (file). First entry should be a hat. Handles next/parent/shadows + SUBSTACK.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xNo
yNo
pathNo
blocksYes
dryRunNo
targetNo
confirmNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.1

TDQS

B3/5.0
Behavior3/5

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

Annotations already declare the tool is idempotent and non-destructive, so the safety profile is covered. The description adds useful behavioral detail: it handles block connections (next/parent/shadows) and requires the first entry to be a hat. No contradictions with annotations. However, it does not disclose side effects like whether existing scripts are replaced or if target must be valid.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence that delivers the core purpose immediately and adds a key constraint. No filler words – every clause contributes value.

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?

Given the complexity (7 parameters, nested block schema, no output schema), the description is insufficient. It fails to explain essential context like what 'file' refers to, the role of target/path, what dryRun and confirm do, and any effect on existing scripts. An agent cannot fully execute this tool correctly from the description alone.

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

Parameters2/5

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

The input schema has 0% description coverage, placing the full burden on the description to explain parameters. The description only hints at the block structure ('Handles next/parent/shadows + SUBSTACK'), which relates to the nested block schema but not to the top-level parameters (blocks, x, y, path, dryRun, target, confirm). No meaning is added for these, leaving agents to guess their roles.

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 clearly states the tool's function: 'Put a whole stack of blocks at once' – distinguishing it from the sibling add_block which likely adds a single block. It also adds a specific constraint ('First entry should be a hat'), which clarifies scope. However, it does not explicitly name add_block as the alternative, so differentiation is implied rather than direct.

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 guidance is given on when to use this tool versus alternatives like add_block or app_put_script. The description does not mention any prerequisites (e.g., a target must exist), exclusions, or scenarios where this tool is preferred. An agent would need to infer from the 'whole stack' wording that it is for multi-block scripts.

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