Skip to main content
Glama

tmh_scan

Scans and indexes a repository into a deterministic SQLite code graph, then bootstraps living knowledge pages covering call chains, HTTP routes, DB tables, domains, and flows.

Instructions

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).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "tmh_scan"
  }
}

Input Schema

NameRequiredDescriptionDefault
repoPathNoLocal path to the repository (optional if server started with --repo or TMH_REPO).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose the durable side effects: it writes a deterministic SQLite graph to a specific path and creates knowledge pages, which is valuable for a write-producing tool. It does not say whether the scan is incremental or full, whether it overwrites an existing .tmh/cache/graph.db, how long it typically takes, or what happens on large repos — meaningful gaps for an indexing operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

One sentence, front-loaded with the action and immediately followed by the output location and the derived artifacts. The parenthetical enumeration is long but each item conveys what gets extracted, so it earns its space; only minor trimming would improve readability.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a one-parameter tool with no output schema and no annotations, the description covers what is produced but leaves out re-run/idempotency semantics, expected cost on large repositories, and its position in the workflow relative to the query siblings. Enough to invoke it once, not enough to invoke it correctly in a repeated or multi-repo workflow.

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?

There is a single optional parameter and schema description coverage is 100%, with the schema itself explaining the --repo/TMH_REPO fallback, so the schema does the semantic work. The description adds nothing about repoPath (no path format, no behavior when omitted), so 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?

The description gives specific verbs ('Scan and index') and a concrete resource (a repository), and it names the exact artifact produced (.tmh/cache/graph.db) plus the derived knowledge pages (call chains, routes, DDL, domains, flows, statecharts). An agent can tell this is the indexing/bootstrap step that presumably feeds tools like tmh_chain, tmh_overview, and tmh_search, though it never names a sibling explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied: the words 'Scan and index' and 'bootstrap' suggest a first-run preparation step before query tools are useful, but the description states no explicit when-to-use, no prerequisite ordering relative to siblings, and no conditions under which you would skip or re-run it. An agent must infer the sequencing.

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