Skip to main content
Glama

cavalry_run_script

Run batched Cavalry JavaScript with _mg helpers in a single Undo group and return values for JSON readback.

Instructions

Run batched Cavalry JavaScript with _mg helpers and one Undo group. Return a value for JSON readback.

Input Schema

NameRequiredDescriptionDefault
codeYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.0.0

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose two real traits: all effects collapse into one Undo group (atomicity), and a returned value is read back as JSON (serialization requirement). It says nothing about permissions, error/failure behavior, whether the script can leave partial state on failure, or what _mg helpers actually are.

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?

Two short sentences, front-loaded with the operation and followed by the two constraints that matter. No filler, though the phrasing is terse enough to be slightly cryptic.

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

Completeness3/5

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

For a one-parameter scripting tool with no annotations or output schema, the description covers the return path ('JSON readback') and undo semantics, which is more than most. Gaps remain around the _mg helper surface and failure behavior, which matter for arbitrary code execution.

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?

The single `code` parameter has 0% schema description coverage, so the description must compensate. It does add guidance — the code may use _mg helpers and should return a JSON-serializable value — but does not clarify the string format, expected structure, or any length/context constraints.

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 concrete verb and resource: run batched Cavalry JavaScript. Adds the distinguishing traits (with _mg helpers, a single Undo group), which separates it from a plain script runner. It does not explicitly contrast with cavalry_inspect or cavalry_run_preset, so sibling differentiation is only implicit.

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 statement of when to use this rather than cavalry_run_preset or cavalry_inspect, and no prerequisites or exclusions. 'Batched' hints that this suits multiple operations, but the agent must infer that from a single adjective.

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