LeanGate
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| MEM0_API_KEY | No | Mem0 API key for remembering rejected findings and conventions. | |
| LEANGATE_MOCK | No | Set to 1 to force offline mode (no keys needed). | |
| NEBIUS_API_KEY | No | Nebius Token Factory API key for Nemotron models. | |
| TAVILY_API_KEY | No | Tavily API key for grounding claims in official docs. | |
| TYPESAFE_API_KEY | No | TypeSafe API key for Jev decisions (alternative to OPENROUTER_API_KEY). | |
| OPENROUTER_API_KEY | No | OpenRouter API key for Jev decisions. | |
| LEANGATE_REMOTE_URL | No | URL of the remote verification service to offload rewrites and grounding. | |
| LEANGATE_REVIEW_TIER | No | Model tier for review decisions (default: Nano). | |
| LEANGATE_MISSING_TIER | No | Model tier for the 'what's missing' review (default: Nano). | |
| LEANGATE_CONFIRM_MINOR | No | Set to 1 to send all findings to Jev, including minor ones. | |
| LEANGATE_ESCALATE_TIER | No | Model tier for escalate decisions (default: Super). | |
| LEANGATE_SERVICE_TOKEN | No | Token for the remote verification service. | |
| LEANGATE_DASHBOARD_PORT | No | Port for the live dashboard (default 8765). | |
| LEANGATE_DECISION_CACHE | No | Set to 0 to disable the decision cache. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| check_reuseA | Optional, before writing a general-purpose function or helper your own search didn't find. Describe what you are about to build in |
| verify_leanA | Call when you finish a change, before you report done or commit. Checks new code for three things. Bloat: duplicates of existing code, dead code, unused imports, redundant
checks, single-implementation abstractions, pass-through wrappers, hand-rolled stdlib functions, unneeded
dependencies. Error handling: swallowed exceptions, missing timeouts, unchecked subprocesses, unclosed files,
imports of project modules or names that don't exist. Security: injection, hard-coded secrets, verify=False,
unsafe deserialization, unknown or vulnerable packages. |
| minimizeA | Return a smaller version of a Python module with identical behavior. The rewrite (Nemotron) is pre-checked (Jev) and then run against |
| prove_equivalentC | Run the same tests (importing from module |
| check_dependencyA | Call BEFORE adding a package. Checks it exists on PyPI (catches hallucinated names), known
vulnerabilities (OSV.dev), maintenance, and whether something the project already has covers |
| record_feedbackA | Tell LeanGate whether a finding was right. A rejected finding (accepted=false) is never raised again,
except a security finding: only a person can waive one ( |
| show_reportA | Open LeanGate's live dashboard (127.0.0.1 only) in the browser, showing the latest reports for this repo. Call it only when the user asks to see the report. It starts the local dashboard if it isn't running. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 7 tools
Each tool maps to a distinct action in the code-quality workflow: feedback capture, report viewing, pre-write reuse search, post-change gate, minimization, equivalence proof, and dependency vetting. The potential overlap between check_reuse and check_dependency is resolved by scope (functions vs packages), and minimize/prove_equivalent differ clearly in intent and return value. An agent can select the right tool from the descriptions alone.
All names use snake_case, and six of seven follow a verb_noun/verb_object pattern (record_feedback, show_report, check_reuse, verify_lean, prove_equivalent, check_dependency). The lone single-verb name (minimize) is a minor deviation but still clear and consistent in style. No mixed casing or vague verbs.
Seven tools is well-scoped for a quality-gate server, covering the full loop from writing code to verifying, minimizing, and dependency checking. Each tool has a clear job and no obvious redundancy. Not too few, not bloated.
The surface covers the core lifecycle: pre-write reuse/dependency checks, post-change verification, minimization with testing, equivalence proof, feedback, and dashboard reporting. Gaps are minor—there is no tool to list past findings programmatically, and security waivers are intentionally CLI/human-only—but agents can work around these. Overall a complete set for the stated purpose.