Skip to main content
Glama

Dry-run a Lugh program in the sandbox

lugh_run
Read-onlyIdempotent

Dry-run a Lugh program in a sandbox so every fs, http, MCP, and shell call passes real policy gates and budgets; returns output plus a policy log to preview an agent's actions before real execution.

Instructions

Run a Lugh program's goals in a sandbox. fs, http, mcp and shell act on a simulated world (see lugh_sandbox), but every call passes the real policy gate and budgets. Returns the output and a policy log of every action and its decision (allowed, approved, declined, denied). Use it to show a person exactly what an agent would do before it runs for real.

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": {
      "code": "<code>"
    },
    "name": "lugh_run"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYesA complete Lugh program, starting with `agent <Name>`.
approvalsNoHow to answer `ask human` and policy approvals. Default approve.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior3/5

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

Adds real value beyond the annotations by disclosing the crucial nuance that fs/http/mcp/shell act on a simulated world while calls still pass the real policy gate and budgets — something readOnlyHint/destructiveHint cannot convey. It also names the policy log's decision vocabulary (allowed, approved, declined, denied). It does not say whether budget consumption is actually charged during a dry run or whether state persists between calls, which is the main remaining behavioral question for a sandbox tool.

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?

Three sentences, front-loaded with the action, then the surprising nuance (simulated world, real policy), then the use case. No sentence is filler and the justification sentence correctly comes last.

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?

Only two parameters, both described, annotations cover safety/idempotency, and the description states what is returned (output plus a policy log with decision states) in lieu of an output schema. An agent has enough to decide and invoke correctly.

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 coverage is 100% with both parameters fully documented, so baseline 3 applies. The description's mention of the policy gate and its decision outcomes adds useful framing for the approvals enum, but it never explicitly discusses the parameters or what 'approve' does at runtime versus on paper.

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 ("Run a Lugh program's goals in a sandbox") and frames the value proposition in the closing sentence ("show a person exactly what an agent would do before it runs for real"). The dry-run framing implicitly distinguishes it from a real execution path, but no sibling such as lugh_check or lugh_test is named as the alternative, so differentiation rests on inference.

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?

The final sentence gives clear usage context: use it to preview what an agent would do before a real run. It does not state when NOT to use it or redirect to the siblings lugh_check, lugh_test, or lugh_sandbox, so the exclusions an agent might need are absent.

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