Skip to main content
Glama

ingest_local

Build a knowledge graph from a local directory of docs and code files, indexing markdown links, wikilinks, and code imports for traversal and search.

Instructions

Build a knowledge graph from a local directory of docs and/or code files.

Docs (md/markdown/mdx/txt/wiki/rst/adoc) are indexed as-is with edges from markdown links and [[wikilinks]]; code files contribute import/include edges and searchable symbol headers. Returns site_id plus a graph-quality verdict: READY (traversable edges found) or NOT-READY (no links/imports; use search).

relations selects the derived relation dimensions, chosen per node: "auto" (keyless: mentions_symbol/similar_to/sibling_of/supersedes/ shares_heading/shares_term/duplicate_of/coupled_with/co_cited_with), "llm" (auto + an LLM router plus entity/embedding similarity), "all", "off", or an explicit comma list. Omit it to use $SITE_KG_RELATIONS, or "auto" when that is unset. Content-derived edges also run on corpora with no cross-references; the verdict still reports NOT-READY for those.

Input Schema

NameRequiredDescriptionDefault
pathYes
max_filesNo
relationsNo
respect_gitignoreNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does substantial work: it explains what edges each file class contributes, defines the READY/NOT-READY verdict and its one caveat (content-derived edges still run when the verdict is NOT-READY), and discloses the return payload (site_id + verdict). Gaps remain around cost/duration for large directories, idempotency of re-ingestion, and failure behavior on bad paths.

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?

The purpose sentence is front-loaded and the file-type/edge breakdown follows logically. The relations paragraph is dense but each clause carries distinct information. Slight over-density in the closing sentence about content-derived edges and the verdict, which restates the caveat twice.

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 4-parameter mutation tool with no annotations and no output schema, the description covers the return value and the relation model well. It falls short on `max_files` (what happens when exceeded — truncation? error?), `respect_gitignore` semantics, and whether ingesting the same path twice duplicates or replaces the graph — all decision-relevant for an agent.

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?

Schema description coverage is 0%, so the description must compensate. It does so thoroughly for `relations`, enumerating every accepted value ('auto', 'llm', 'all', 'off', explicit comma list) and the env-var fallback chain — information found nowhere in the schema. However, `path`, `max_files` (default 2000), and `respect_gitignore` (default true) get zero explanation, leaving half the surface undocumented in both places.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Specific verb + resource + scope: 'Build a knowledge graph from a local directory of docs and/or code files.' The word 'local' implicitly separates it from the ingest_url sibling, and it enumerates the supported file types, so an agent knows exactly what corpus this accepts.

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?

There is useful conditional guidance inside the output contract — 'NOT-READY ... use search' tells the agent what to do after a link-less corpus — and the relations defaulting rules ($SITE_KG_RELATIONS, then 'auto') are spelled out. But there is no explicit when-to-use-this-vs-ingest_url statement and no stated preconditions (does the site need to exist first, does it replace or append to an existing graph?).

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