Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
MEM0_API_KEYNoMem0 API key for remembering rejected findings and conventions.
LEANGATE_MOCKNoSet to 1 to force offline mode (no keys needed).
NEBIUS_API_KEYNoNebius Token Factory API key for Nemotron models.
TAVILY_API_KEYNoTavily API key for grounding claims in official docs.
TYPESAFE_API_KEYNoTypeSafe API key for Jev decisions (alternative to OPENROUTER_API_KEY).
OPENROUTER_API_KEYNoOpenRouter API key for Jev decisions.
LEANGATE_REMOTE_URLNoURL of the remote verification service to offload rewrites and grounding.
LEANGATE_REVIEW_TIERNoModel tier for review decisions (default: Nano).
LEANGATE_MISSING_TIERNoModel tier for the 'what's missing' review (default: Nano).
LEANGATE_CONFIRM_MINORNoSet to 1 to send all findings to Jev, including minor ones.
LEANGATE_ESCALATE_TIERNoModel tier for escalate decisions (default: Super).
LEANGATE_SERVICE_TOKENNoToken for the remote verification service.
LEANGATE_DASHBOARD_PORTNoPort for the live dashboard (default 8765).
LEANGATE_DECISION_CACHENoSet 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

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}

Tools

Functions exposed to the LLM to take actions

NameDescription
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 intent (e.g. "retry HTTP calls with exponential backoff"); optionally pass your draft in code. Returns the closest existing symbols, each with a decision: reuse | adapt | write_new; the repo's own helpers for library calls the intent touches (house_helpers); and project conventions. write_new means none of these few matches fits, not that the repo lacks it.

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. diff is a unified diff; omit it to check the working tree against HEAD. Returns gate=pass|block with findings. Fix blocking findings or reject wrong ones via record_feedback.

minimizeA

Return a smaller version of a Python module with identical behavior.

The rewrite (Nemotron) is pre-checked (Jev) and then run against tests in a sandbox. Tests must import from a module named target. Without tests, tests are generated. A rewrite that changes behavior is rejected and the original is returned.

prove_equivalentC

Run the same tests (importing from module target) against two versions of a module. equivalent is null when there were no tests to run (none given, and none could be generated): unproven, not shown to differ.

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 purpose. Returns recommendation: add | use_existing | avoid.

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 (leangate waive), so tell the user why you think it's wrong instead. If note states a project convention (e.g. "we always validate at API handlers"), it is remembered.

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

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.6/5.0

Scored across 7 tools

Disambiguation5/5

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.

Naming Consistency4/5

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.

Tool Count5/5

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.

Completeness4/5

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.