Skip to main content
Glama

lean_diagnostics

Run sandboxed offline diagnostics on a project-relative Lean source file in an approved Lake workspace, returning explicit failed, unavailable, or invalid-input statuses.

Instructions

Elaborate a project-relative Lean source file in the approved Lake workspace.

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": {
      "file": "<file>"
    },
    "name": "lean_diagnostics"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.6/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden. It does not say whether this is a read-only analysis or triggers a build, how failures are reported, whether elaboration output/diagnostics are returned, or how expensive the call is — for a compiler-adjacent operation these are significant omissions.

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?

A single tight sentence with the key scoping qualifier ("project-relative", "approved Lake workspace") placed inline. Nothing is wasted, though the terseness borders on under-specification rather than genuine economy.

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?

With no annotations and no output schema, the description must explain both safety profile and result shape, and it does neither. For a Lean elaboration call whose whole value is the diagnostics it produces, an agent cannot tell what it will get back or what success looks like.

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 0% and the schema only says the `file` value is a non-empty string. The phrase "project-relative" usefully clarifies that the path is resolved against the Lake project root rather than the filesystem, which is real added meaning, but nothing is said about extensions, absolute paths, or out-of-project files.

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

Purpose3/5

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

The description names a resource (a Lean source file in the Lake workspace) and an action ("elaborate"), so an agent can roughly infer type-checking/processing. However, "elaborate" is domain jargon with no plain-language gloss, and nothing distinguishes this from the sibling lean_verify, leaving the agent unsure which one to pick.

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?

There is no statement of when to use this tool, when not to, or how it relates to lean_verify. The only implicit constraint is that the workspace must be "approved" and the file project-relative, which is a precondition rather than usage guidance.

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

Deploy Server

Other Tools