tmh-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| TMH_REPO | No | Path to the default workspace repository that the MCP server binds to, so tools do not need `repoPath` on every call. Equivalent to passing `--repo <path>`. If not set, repository paths must be supplied per tool call. |
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
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| tmh_scanB | Scan and index a repository into TMH's deterministic SQLite code graph (.tmh/cache/graph.db) and bootstrap living knowledge pages (multi-language call chains, HTTP routes, DB tables/DDL, domains, flows, and statecharts). |
| tmh_overviewB | Get architecture overview of the code graph: business domains, flows, database tables/DDL/FK relations, CRUD matrix, and built-in domain KBs. |
| tmh_searchA | Search across the code graph (domains, flows, tables, symbols), living project knowledge pages (.tmh/knowledge/), and built-in domain KBs (supports bilingual Chinese-English keyword expansion). |
| tmh_readA | Read a built-in domain KB (e.g. builtin:crypto-sm.md), a living knowledge page (.tmh/knowledge/...), or a repository source file by line range (secret files are automatically blocked). |
| tmh_verify_evidenceB | Anti-hallucination source citation verifier: check a file:line or file:start-end reference against the repository and return exact lines. |
| tmh_impactB | Deterministic change impact analysis: given a file path, symbol, table, or HTTP route, return affected call chains, business domains, flows, and tables. |
| tmh_chainA | Business-flow evidence Q&A: trace a business question or requirement to related domains, flows, data tables, and verifiable source citations. |
| tmh_statechartsC | Extract code-level state machines and state transitions detected in the repository. |
| tmh_kb_statusA | Inspect living knowledge base status: page coverage, confirmed vs. inferred pages, code-fingerprint staleness, and open questions. |
| tmh_kb_nextA | Fetch the next batch of unwritten or stale living knowledge pages with grounded code-graph facts so an agent can author or refresh them. |
| tmh_kb_commitB | Write or update a living knowledge page (.tmh/knowledge/) with automatic source-citation validation and code-fingerprint anchoring. |
| tmh_kb_confirmA | Mark a living knowledge page as human/reviewer confirmed so downstream agents know its business rules have been verified. |
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 12 tools
Most tools target clearly distinct operations (scan, overview, search, read, verify, statecharts, and a four-step KB workflow). The main overlap is between tmh_impact (deterministic change impact for a file/symbol/table/route) and tmh_chain (business-question tracing), since both return affected domains, flows, and citations, and between tmh_search and tmh_read where one finds and the other retrieves. Descriptions do enough to steer selection, but an agent could occasionally pick the wrong one of the pair.
All names share a consistent tmh_ prefix and snake_case convention, with the KB tools forming a clean tmh_kb_* subgroup. Within the prefix, styles shift between verbs (scan, search, read, verify_evidence, commit, confirm) and noun-like labels (overview, impact, chain, statecharts, status, next). Still highly predictable and readable, just not a single uniform verb_noun pattern.
Twelve tools sit comfortably in the well-scoped 3-15 range and each maps to a real stage of the workflow: indexing, exploration, evidence verification, impact analysis, and the KB authoring lifecycle. No obviously redundant or filler tools are present.
The surface covers the full path from scan to knowledge maintenance (status, next, commit, confirm) plus verification and impact tracing, so agents have no major dead ends. Minor gaps remain, such as no explicit delete/retire or invalidate operation for knowledge pages and no raw graph/dependency query separate from impact analysis. These are workaroundable rather than blocking.