Skip to main content
Glama

lean_build

Destructive

Builds the Lean project and restarts the language server to apply new imports or resolve build issues. Use only when needed after import or dependency changes.

Instructions

Build the Lean project and restart LSP. Use only if needed (e.g. new imports).

Input Schema

NameRequiredDescriptionDefault
cleanNoRun lake clean first (slow)
fetch_cacheNoRun lake exe cache get before building (slow)
output_linesNoReturn last N lines of build log (0=none)
lean_project_pathNoPath to Lean project

Output Schema

NameRequiredDescriptionDefault
errorsNoBuild errors if any
outputYesBuild output
successYesWhether build succeeded

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.28.0
    • addedInput schema / properties / fetch_cache
      Added value: +{
      +  "default": false,
      +  "description": "Run lake exe cache get before building (slow)",
      +  "title": "Fetch Cache",
      +  "type": "boolean"
      +}
  2. Addedv0.10.0
  3. Removedv0.23.1
  4. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, idempotentHint=false and openWorldHint=true, so the mutation risk profile is covered. The description adds information the annotations cannot express — that the LSP server is restarted as a side effect — which is important state-changing context for the agent. It does not mention build duration or failure behavior, which the schema only hints at via '(slow)'.

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 short sentences, zero waste, with the action and its side effect front-loaded before the usage restriction. Nothing could be removed without losing 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?

An output schema exists and all parameters are fully described, so the description only needs to convey purpose, side effects and gating — all of which it does. The only omission is the cost/blocking nature of the build, which is partially covered by the schema's 'slow' notes.

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 each of the four options (clean, fetch_cache, output_lines, lean_project_path) documented including cost warnings. The description adds no parameter-level meaning, so the schema does the work and a baseline 3 applies.

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 ('Build the Lean project') and adds the key side effect ('restart LSP'). It implicitly separates itself from siblings like lean_run_code or lean_verify, but never names an alternative explicitly.

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?

Gives a clear gating condition ('Use only if needed') with a concrete triggering example ('new imports'), which steers the agent away from habitual rebuilding. It stops short of naming the alternative tools to use when a build is not needed.

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