Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
GEMINI_API_KEYNoGoogle Gemini API key. Auto-detected and inherited from the system environment when present (optional; required only for AI provider mode).
NVIDIA_API_KEYNoNVIDIA NIM API key. Auto-detected and inherited from the system environment when present (optional; required only for AI provider mode).
OPENAI_API_KEYNoOpenAI API key. Auto-detected and inherited from the system environment when present (optional; required only for AI provider mode).
ANTHROPIC_API_KEYNoAnthropic API key. Auto-detected and inherited from the system environment when present (optional; required only for AI provider mode).
OPENROUTER_API_KEYNoOpenRouter API key. Auto-detected and inherited from the system environment when present (optional; required only for AI provider mode).
TZERO_NO_AUTO_INSTALLNoSet to 1 to opt out of the automatic dependency check/install that runs on startup.

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
get_project_context_treeA

Scans the target project directory and builds an enterprise-grade multi-tier T-Zero hierarchical context tree (T-1 Master Architecture, T-2 Module References, T-3 AST Signatures, T-4 Agent Boundary Rules).

Behavior:

  • Read-only: Performs static AST analysis without modifying any files on disk.

  • Idempotent: Deterministic output for identical repository states.

  • 100% Offline: Executes locally without network calls, external embeddings, or LLM billing.

Usage Guidelines:

  • When to use: Ingest repository architecture and signatures into prompt context at the start of a coding session or before large refactors (80-95% token savings).

  • Sibling Routing: For a fast single-page class/method symbol index, use 'generate_repo_map'. For full implementation of an active file with 1st-degree caller/callee skeletons, use 'get_smart_skeleton_context'. For arbitrary in-memory snippets, use 'prune_code_snippet'.

Returns: Structured Markdown containing directory tree, module outlines, and AST signatures up to max_tokens.

query_module_dependenciesA

Analyzes import/export dependencies, module relationships, and internal vs external package dependencies across polyglot files (Python, TypeScript, Go, Rust, Java, C#, C++).

Behavior:

  • Read-only: Inspects source syntax trees without modifying or moving files.

  • Idempotent: Deterministic dependency mapping for any scanned repository.

  • 100% Offline: Local regex and AST parsing; zero external network requests.

Usage Guidelines:

  • When to use: Run before refactoring, moving, or removing a module to inspect inbound dependents (who imports this) and outbound dependencies (what this imports).

  • Sibling Routing: For deep recursive function/method call chains (caller -> callee call graph), use 'trace_symbol_call_chain'. To test whether imports violate layer boundary rules, use 'enforce_architecture_boundaries'.

Returns: Markdown report detailing inbound referrers, outbound imports, and the workspace dependency pool.

query_architecture_boundariesA

Retrieves active T-4 architectural tier boundary definitions, operational constraints, and zero-leak security rules defined in tzero.rules.json or built-in defaults.

Behavior:

  • Read-only: Reads configuration files; does not modify rules or codebase files.

  • Idempotent: Returns consistent rule definitions for identical configurations.

  • 100% Offline: Local JSON file lookup without remote calls.

Usage Guidelines:

  • When to use: Consult before designing new features or adding imports to understand layer isolation rules (e.g. presentation cannot import database models) and avoid architecture violations.

  • Sibling Routing: To actively validate workspace code against these rules and detect violations, use 'enforce_architecture_boundaries'. To view complete Mermaid topology blueprints, use 'generate_architecture_blueprint'.

Returns: Markdown specification of architectural layers, allowed/forbidden import directions, and security constraints.

generate_architecture_blueprintA

Generates a complete system architectural specification (ARCHITECTURE.md) including auto-generated Mermaid component topology diagrams, layer boundaries, and module hierarchies.

Behavior:

  • Read-only by default: Returns formatted markdown text. Does NOT write files unless invoked via CLI export.

  • Idempotent: Produces deterministic AST topology when use_ai=False.

  • Cost: 100% free and local by default (use_ai=False). If use_ai=True, uses configured environment API key (e.g. NVIDIA NIM / OpenAI) for enriched architectural narrative.

Usage Guidelines:

  • When to use: Create or update system architecture documentation and visual Mermaid flow diagrams for onboarding or RFC review.

  • Sibling Routing: For checking rule compliance against defined boundaries, use 'enforce_architecture_boundaries'. For basic dependency trees, use 'query_module_dependencies'.

Returns: Comprehensive Markdown document with live Mermaid diagrams, layer classifications, and component interfaces.

generate_repo_mapA

Generates an ultra-compressed AST symbol token map (classes, methods, functions) tailored for LLM chat prompts and extreme context window savings.

Behavior:

  • Read-only: Extracts AST signatures without writing or modifying files.

  • Idempotent: Deterministic symbol catalog for the same codebase state.

  • 100% Offline: Local AST extraction; zero external API calls.

Usage Guidelines:

  • When to use: Provide the LLM with an immediate high-level index of all classes and functions across the repository in minimal tokens (~5-15 tokens per file).

  • Sibling Routing: For full function signatures with parameter types and docstrings, use 'get_project_context_tree'. For 1st-degree context around a specific focus file, use 'get_smart_skeleton_context'.

Returns: Compact Markdown symbol map indexed by file path.

audit_codebase_qualityA

Performs an AST static code smell audit, cyclomatic complexity check, copy-paste duplicity scan, and 100% Zero-Leak security audit for exposed credentials.

Behavior:

  • Read-only: Evaluates AST nodes and regex patterns; does not modify or delete files.

  • Idempotent: Produces consistent quality diagnostics for the same code.

  • 100% Offline: Fully private local analysis; zero external requests.

Usage Guidelines:

  • When to use: Run as a pre-commit or pre-PR code health audit to identify complex routines (> 30 lines, > 5 args), missing docstrings, architectural boundary violations, and hardcoded secrets.

  • Sibling Routing: If you only need to verify zero hardcoded secrets/API keys, use 'verify_zero_leak_security'. If you only want unused function detection, use 'find_dead_code'. If you only want duplicate logic blocks, use 'find_code_duplicity'.

Returns: Comprehensive diagnostic Markdown report with severity ratings (T-001 Security, T-002 Boundaries, T-003 Contracts, T-004 Complexity), line numbers, and actionable remediation steps.

find_code_duplicityA

Scans the repository to identify duplicate or copy-pasted blocks of code across multiple files to identify refactoring opportunities.

Behavior:

  • Read-only: Hashes and compares source lines; does not modify code.

  • Idempotent: Deterministic duplicate detection for any codebase state.

  • 100% Offline: Fully local execution without network calls.

Usage Guidelines:

  • When to use: Run during refactoring sprints to locate redundant copy-pasted code blocks suitable for extraction into shared utility functions.

  • Sibling Routing: For full codebase quality and complexity audits, use 'audit_codebase_quality'. For unused unreferenced code, use 'find_dead_code'.

Returns: Markdown report detailing duplicate code clusters with file paths, line ranges, and side-by-side code snippets.

estimate_token_costA

Calculates exact token count and estimated API prompting cost (USD) across major LLM providers (OpenAI GPT-4o, Claude 3.7 Sonnet, Groq, NVIDIA NIM, and Ollama $0) for a given text or directory.

Behavior:

  • Read-only: Mathematical cost projection; does NOT invoke provider APIs or incur financial billing.

  • Idempotent: Produces exact calculations for identical token counts.

  • 100% Offline: Uses local pricing tables without external HTTP queries.

Usage Guidelines:

  • When to use: Estimate prompt token volume and dollar costs before sending large codebase context to commercial LLM APIs.

  • Sibling Routing: To track team monthly/annual cumulative ROI savings and compression metrics over time, use 'get_token_savings_metrics'.

Returns: Markdown table comparing per-million token rates and total estimated costs across major models.

analyze_change_impactA

Calculates blast radius score (0-100) and identifies all direct and transitive dependent modules across the codebase before modifying a specific function, class, or symbol.

Behavior:

  • Read-only: AST dependency graph traversal; does not modify source files.

  • Idempotent: Deterministic impact calculation for any given target symbol.

  • 100% Offline: Local AST analysis without remote services.

Usage Guidelines:

  • When to use: Run BEFORE renaming, refactoring, or modifying a function or class to determine which caller modules could break.

  • Sibling Routing: For deep recursive caller/callee trees with visual Mermaid graphs, use 'trace_symbol_call_chain'. For file-level module dependencies, use 'query_module_dependencies'.

Returns: Structured Markdown report with blast radius score, risk tier, direct dependents, and transitive impact paths.

enforce_architecture_boundariesA

Enforces T-4 architectural boundary rules (tzero.rules.json), verifying modular separation and detecting unauthorized cross-layer imports.

Behavior:

  • Read-only: Audits import AST statements; does NOT block git, mutate code, or modify configuration files.

  • Idempotent: Yields consistent validation results for any given codebase state.

  • 100% Offline: Local AST validation without external dependencies.

Usage Guidelines:

  • When to use: Run in CI/CD pipelines or before committing to verify that presentation/UI layers do not import internal database/storage modules directly.

  • Sibling Routing: To view active boundary rules without evaluating code, use 'query_architecture_boundaries'. For general code quality smells, use 'audit_codebase_quality'.

Returns: Compliance report detailing pass/fail status, violating file paths, line numbers, layer names, and allowed import directions.

search_codebase_semanticA

100% Private, local hybrid BM25 + TF-IDF semantic code search across workspace AST tokens, function headers, and docstrings without sending code to third-party embedding APIs.

Behavior:

  • Read-only: In-memory inverted index query; does not modify files.

  • Idempotent: Deterministic search ranking for identical query and code states.

  • 100% Offline & Private: Never sends code or embeddings to external APIs; $0 cost and zero data leakage.

Usage Guidelines:

  • When to use: Find functions, classes, or logic snippets using conceptual natural language queries (e.g. 'authentication jwt token verify', 'rate limit algorithm').

  • Sibling Routing: For exact string or regex matches, use IDE grep or ripgrep. For finding unused code, use 'find_dead_code'.

Returns: Ranked Markdown list of matching code snippets with file locations, match scores, and surrounding context.

export_agent_rulesA

Generates and writes standardized AI agent rule specifications (.cursorrules, .cursor/rules/*.mdc, .clinerules, and .github/copilot-instructions.md) into the workspace.

Behavior:

  • Mutating: Creates or updates configuration files in the target workspace directory.

  • Idempotent: Overwrites existing T-Zero agent rule files with current architecture rules without corrupting user customizations.

  • 100% Offline: Generates rule files locally using built-in templates.

Usage Guidelines:

  • When to use: Run when setting up a repository for AI pair-programming with Cursor, Claude Code, Cline, Windsurf, or GitHub Copilot.

  • Sibling Routing: To view architectural boundaries without writing files to disk, use 'query_architecture_boundaries'.

Returns: Confirmation message listing all generated rule file paths.

get_token_savings_metricsA

Computes quantitative token compression metrics, reduction percentage, and developer team financial ROI savings (USD/month).

Behavior:

  • Read-only: Evaluates codebase file sizes and compressed token counts; does not alter files or call APIs.

  • Idempotent: Deterministic metric calculations for current codebase volume.

  • 100% Offline: Fully local calculation without network access.

Usage Guidelines:

  • When to use: Quantify efficiency gains and financial savings from T-Zero context compression for team reports and engineering leadership.

  • Sibling Routing: For per-model single-prompt cost comparisons (OpenAI vs Anthropic vs Gemini), use 'estimate_token_cost'.

Returns: Markdown executive summary with token reduction percentages, monthly developer cost savings, and annual ROI projections.

get_incremental_diff_contextA

Calculates hyper-compact PR git diff context (changed symbols + downstream blast radius dependents) for 98%+ token savings during code review and debugging.

Behavior:

  • Read-only: Inspects git diff and local AST; does not stage, commit, or revert any git changes.

  • Idempotent: Deterministic for the same git working tree status.

  • 100% Offline: Local git CLI and AST processing.

Usage Guidelines:

  • When to use: Provide focused context during code review, PR description generation, or bug hunting for pending changes with 98%+ token reduction.

  • Sibling Routing: For full repository context, use 'get_project_context_tree'. For single-symbol impact analysis, use 'analyze_change_impact'.

Returns: Structured Markdown diff context with changed symbol signatures, diff hunks, and caller references.

prune_code_snippetA

Compresses arbitrary in-memory source code or text into compact AST/interface signatures on-the-fly, returning pruned code and precise token savings percentage (80-95% reduction).

Behavior:

  • Pure in-memory transformation: Does not read or write any files on disk; takes text input and returns pruned text.

  • Idempotent: Deterministic output for identical input code and reduction mode.

  • 100% Offline: Polyglot AST/regex parsers for Python, TypeScript, Go, Rust, Java, C#, C++, Swift, Kotlin.

Usage Guidelines:

  • When to use: Compress in-memory code blocks or clipboard buffers before passing them into LLM chat prompts.

  • Sibling Routing: To scan and compress entire directories or repositories on disk, use 'get_project_context_tree' or 'get_smart_skeleton_context'.

Returns: Markdown fenced code block with pruned signatures and precise token reduction percentage.

verify_zero_leak_securityA

100% Zero-Leak security scanner. Analyzes a file, code snippet, or repository workspace for hardcoded API keys (OpenAI, Anthropic, NVIDIA, Gemini, HuggingFace, GitHub), private keys, JWT tokens, and cloud secrets (100% private, 0 external network calls, $0 cost).

Behavior:

  • Read-only: Pattern matching and entropy analysis; does NOT modify, expose, or upload credentials.

  • Idempotent: Deterministic security findings for identical content.

  • 100% Offline & Private: Never transmits inspected text to any remote server; all secret detections are masked.

Usage Guidelines:

  • When to use: Run before git commit, push, or public release to guarantee zero secret leaks.

  • Sibling Routing: For broad code quality audits including complexity, docstrings, and layer rules, use 'audit_codebase_quality'.

Returns: Security pass/fail report with masked secret snippets, affected file paths, and line numbers.

verify_hallucination_guardA

Eliminates AI coding hallucinations before code is written or applied. Parses proposed code and verifies all internal imports and function/method call contracts (argument counts and keyword parameter names) against known workspace AST signatures.

Behavior:

  • Read-only: Compares AST call signatures against local symbol catalog; does not modify source files.

  • Idempotent: Deterministic contract verification.

  • 100% Offline: Uses local AST indices without remote queries.

Usage Guidelines:

  • When to use: Run BEFORE applying AI-generated code to prevent hallucinated module imports, missing functions, or wrong argument counts.

  • Sibling Routing: To enforce layer boundary separation rules, use 'enforce_architecture_boundaries'.

Returns: Verification status report with specific contract mismatches and 'did you mean' fuzzy suggestions.

get_smart_skeleton_contextA

Focus-aware dynamic skeletonizer. Returns the full, unpruned implementation of the focus file (or specific focus symbol), surrounded by ultra-compact T-3 AST signatures for all 1st-degree outbound imports and inbound callers. Solves the 'Lost in the Middle' problem while saving 95%+ tokens.

Behavior:

  • Read-only: Traverses local AST dependencies; does not mutate files.

  • Idempotent: Returns identical focus + skeleton bundles for the same codebase state.

  • 100% Offline: Local AST parsing and signature reduction.

Usage Guidelines:

  • When to use: Run when editing a specific file to provide the LLM with full implementation context plus compact interface skeletons of adjacent modules.

  • Sibling Routing: For repository-wide context, use 'get_project_context_tree'. For symbol index without file contents, use 'generate_repo_map'.

Returns: Structured Markdown with full focus file source code and 1st-degree AST skeletons for imported and caller modules.

rank_repository_pagerankA

Identifies the architectural backbone and most critical modules of any repository using graph-theory PageRank centrality over AST import and reference topologies. Ranks modules by inbound/outbound degree and structural criticality.

Behavior:

  • Read-only: Graph centrality computation; does not alter files.

  • Idempotent: Deterministic PageRank convergence for identical import graphs.

  • 100% Offline: Fully local graph traversal without external dependencies.

Usage Guidelines:

  • When to use: Run when exploring an unfamiliar codebase to immediately identify the core architectural modules versus peripheral utilities.

  • Sibling Routing: For direct pairwise dependencies of a file, use 'query_module_dependencies'. For blast radius of a single function, use 'analyze_change_impact'.

Returns: Ranked Markdown table with PageRank centrality scores, inbound/outbound degrees, and architectural significance notes.

trace_symbol_call_chainA

Traces deep execution paths across the codebase AST. Recursively discovers upstream callers (who calls symbol_name) and downstream callees (what symbol_name calls) up to max_depth, rendering an execution tree and Mermaid call diagram.

Behavior:

  • Read-only: Recursively traverses AST function call expressions; does not modify source code.

  • Idempotent: Deterministic call graph traversal.

  • 100% Offline: Local AST analysis without external services.

Usage Guidelines:

  • When to use: Run when debugging execution flows, tracing data paths into a function, or seeing everything a complex method calls recursively.

  • Sibling Routing: For quick single-symbol blast radius scoring (0-100), use 'analyze_change_impact'. For module-level import relations, use 'query_module_dependencies'.

Returns: Markdown report containing recursive ASCII execution tree, caller/callee counts, and copy-pasteable Mermaid flowchart syntax.

find_dead_codeA

Finds unused, orphaned, or unreferenced functions and classes across the codebase AST. Excludes all, main, dunder methods, and test functions.

Behavior:

  • Read-only: Computes symbol reference counts; does NOT delete or modify any source code files.

  • Idempotent: Consistent dead code candidate discovery for the same repository state.

  • 100% Offline: Local AST reference analysis.

Usage Guidelines:

  • When to use: Run during technical debt cleanup to locate deprecated, dead, or forgotten functions and classes ready for safe removal.

  • Sibling Routing: For copy-pasted duplicate logic blocks, use 'find_code_duplicity'. For general complexity and linting, use 'audit_codebase_quality'.

Returns: Markdown report listing candidate orphaned symbols with file paths, line numbers, and symbol types.

Prompts

Interactive templates invoked by user choice

NameDescription
tzero_groundingGenerates an architectural grounding prompt for AI coding agents.

Resources

Contextual data attached and managed by the client

NameDescription
Architecture BlueprintLive Mermaid architecture blueprint and module topology for the workspace
Active Architectural BoundariesActive T-4 architectural boundaries, Zero-Leak security rules, and constraints
Token ROI & Economic SavingsQuantitative token compression metrics and developer team ROI

TDQS

A4.3/5.0

Scored across 21 tools

Disambiguation4/5

Tools target distinct code-analysis operations (context generation, dependency graphs, architecture rules, quality audits, token metrics). Sibling Routing guidelines explicitly differentiate overlapping tools like get_project_context_tree vs get_smart_skeleton_context and analyze_change_impact vs trace_symbol_call_chain. However, several graph-analysis tools (query_module_dependencies, analyze_change_impact, trace_symbol_call_chain, rank_repository_pagerank) have adjacent scopes that could still cause occasional misselection.

Naming Consistency5/5

All tool names are snake_case and follow a verb_noun structure (get_*, query_*, generate_*, audit_*, etc.). The specific verbs vary but are semantically appropriate and consistent, with no camelCase or chaotic style.

Tool Count3/5

21 tools is in the heavy range (16-25) for a single server. Although each appears to serve a distinct sub-purpose, the set is large enough that discovery and selection may be cumbersome.

Completeness4/5

The surface covers major static-analysis workflows: context generation, dependency mapping, impact analysis, call tracing, architecture enforcement, security scanning, quality audits, and token metrics. Some gaps exist, such as no direct symbol-by-name lookup beyond semantic search or no runtime/test coverage analysis, but these are minor for the apparent read-only static-analysis domain.

Maintenance

ActivityMaintained
ResponsivenessWithin a week