Skip to main content
Glama

Check a Lugh program

lugh_check
Read-onlyIdempotent

Compile a Lugh program without running it to catch syntax errors and unknown functions or adapters, and count goals, tests, routes, and pages.

Instructions

Compile a Lugh program without running it. Reports syntax errors, unknown functions and adapters, and counts goals, tests, routes and pages.

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_check"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYesA complete Lugh program, starting with `agent <Name>`.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description adds meaningful context beyond that: the tool compiles but does not execute, which confirms no side effects, and it discloses the diagnostic categories returned. It stops short of describing error output format or whether warnings vs. errors are distinguished.

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?

Two sentences, both front-loaded with the core action first and the diagnostic payload second. No filler, no restatement of the title, and every clause conveys distinct 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 single-parameter, read-only validation tool with no output schema, the description adequately covers what the agent gets back by enumerating the reported diagnostics and counts. Minor gaps remain around output structure and whether compilation halts at the first error, but nothing essential to correct invocation is missing.

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?

There is a single required parameter with 100% schema description coverage, and the schema already specifies it must be a complete Lugh program beginning with `agent <Name>`. The description adds no parameter-level detail, so the baseline of 3 applies since the schema carries the burden.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb (compile) and resource (a Lugh program) and enumerates what the result contains: syntax errors, unknown functions/adapters, and counts of goals, tests, routes and pages. The clause 'without running it' cleanly separates it from the execution-oriented siblings (lugh_run, lugh_sandbox) without needing to name them.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

'Compile ... without running it' implies the use case: validate a program before executing it. However, there is no explicit when-to-use statement, no exclusion, and no reference to alternatives such as lugh_run or lugh_test, so the routing decision is left to inference.

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