Skip to main content
Glama

Lugh language reference

lugh_reference
Read-onlyIdempotent

Consult Lugh syntax and semantics before writing AI-agent programs to correctly encode permissions, budgets, and human approval in code.

Instructions

Syntax and semantics of Lugh, a programming language for AI agents where permissions (policy), budgets and human approval are part of the code. Read this before writing a program.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "lugh_reference"
  }
}

Input Schema

NameRequiredDescriptionDefault

No arguments

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?

Annotations already declare readOnlyHint, idempotentHint and destructiveHint=false, so the safety profile is fully covered by structured data. The description adds domain context (policy, budgets, human approval embedded in code) but says nothing about what is returned, whether the reference is full or paginated, or how large it is. Useful context, no behavioral disclosure beyond annotations.

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, front-loaded with the subject matter and ending with the actionable instruction. There is no redundant wording or filler.

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 zero-parameter, read-only reference tool with no output schema, the definition covers what it is and when to read it. The only gap is the absence of any hint about the shape or volume of the returned documentation, which is minor given the tool's simplicity.

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?

The tool takes zero parameters, so there is nothing for parameter semantics to document; the schema-coverage baseline of 4 applies. No parameter-related claims are made or needed.

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 names the resource (Lugh syntax and semantics) and characterizes what the language is, so an agent knows this is the documentation/reference entry point. It doesn't explicitly contrast itself with lugh_check or lugh_run, but the 'read this before writing a program' framing positions it as the prerequisite to those siblings.

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?

'Read this before writing a program' gives a clear usage condition and an implicit ordering relative to the check/run/sandbox/test siblings. It stops short of naming an explicit alternative or when-not-to-use case, 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.