Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/davide-desio-eleva/kirograph/llms.txt

Use this file to discover all available pages before exploring further.

KiroGraph-Doc indexes project documentation by heading hierarchy and section structure. Instead of reading entire doc files — which can be thousands of tokens each — agents retrieve exactly the section they need via a stable section ID. This produces 92–97% token savings compared to full-file reads, tracked cumulatively in kirograph_gain. The module is inspired by jDocMunch-MCP by J. Gravelle.

Enabling Docs

Add enableDocs to .kirograph/config.json:
{
  "enableDocs": true
}
On the next kirograph index or kirograph sync, KiroGraph scans for documentation files matching docsInclude patterns and indexes them section by section.

Supported Formats

KiroGraph-Doc ships nine format parsers:
FormatExtensions
Markdown.md, .cheatmd
MDX.mdx
reStructuredText.rst
AsciiDoc.adoc, .asciidoc
RDoc.rdoc
Org-mode.org
HTML.html (in docs/)
Plain text.txt (in docs/)
OpenAPI / Swagger.yaml, .json (schema detection)

How It Works

1

File scanning

KiroGraph walks the project tree, matching files against docsInclude and docsExclude globs. Files larger than docsMaxFileSize are skipped.
2

Parsing

Each file is parsed by its format handler into a section tree. Sections are split at heading boundaries — the heading text becomes the section title, and the content below (up to the next heading) becomes the body. Children are nested headings.
3

Stable section IDs

Each section receives a stable ID derived from the file path, the ancestor heading chain, the section title slug, and the heading level:
docs/api/authentication.md::overview/token-formats#3
IDs are stable across re-indexing as long as the heading structure does not change.
4

Incremental indexing

A SHA-256 hash of the full file is stored on the first root-level section. Re-indexing skips files whose hash has not changed.
5

Code ↔ docs cross-references

When docsLinkCode: true, KiroGraph scans section content for backtick references, CamelCase identifiers, and snake_case patterns and resolves them against the code graph. Links are stored in doc_code_refs and exposed via kirograph_docs_refs.
6

FTS and embeddings

Each section is indexed in a SQLite FTS5 table for keyword search. If enableEmbeddings: true, sections are also embedded for semantic search.

MCP Tools

Documentation tools require enableDocs: true. The 5 tools add approximately ~241 tokens of tool descriptions to the model context.
Returns the table of contents for a specific file or for all indexed documentation.
ParameterTypeDefaultDescription
filestringFilter to a specific doc file. Omit for project-wide TOC.
treebooleanfalseReturn a nested tree structure instead of a flat list
projectPathstringcwdProject root path
Returns section IDs, titles, levels, and summaries — the starting point for targeted section retrieval.
Search documentation sections by query text.
ParameterTypeDefaultDescription
querystringrequiredSearch query (natural language or keywords)
filestringNarrow search to a specific doc file
limitnumber10Max results
projectPathstringcwdProject root path
Searches are independent from code symbol search — FTS5 over section titles and summaries.
Fetches the full content of a single documentation section by its stable ID.
ParameterTypeDefaultDescription
idstringrequiredSection ID from kirograph_docs_toc or kirograph_docs_search
contextbooleanfalseInclude ancestor heading chain and child section summaries
projectPathstringcwdProject root path
Returns only the bytes for that section — not the entire file.
Returns the complete heading hierarchy for a single documentation file.
ParameterTypeDefaultDescription
filestringrequiredRelative path to the doc file
projectPathstringcwdProject root path
Finds code symbols referenced by a doc section, or doc sections that reference a code symbol.
ParameterTypeDefaultDescription
sectionIdstringDoc section ID (find code symbols it references)
nodeIdstringCode symbol qualified name (find doc sections that reference it)
projectPathstringcwdProject root path
Requires docsLinkCode: true for cross-references to be populated.

Context Enrichment

Set docsContextLimit to a positive number to have relevant doc sections automatically injected into kirograph_context results. Sections are included when their relevance score exceeds docsContextThreshold.
{
  "docsContextLimit": 3,
  "docsContextThreshold": 0.5
}
Set docsContextLimit: 3 to get the three most relevant doc sections included in every kirograph_context call. This costs almost nothing — section summaries are typically 1–2 sentences — and frequently surfaces API constraints or usage notes the agent would otherwise miss.

Config Reference

FieldTypeDefaultDescription
enableDocsbooleanfalseEnable documentation indexing
docsIncludestring[]["**/*.md", "**/*.mdx", ...]Glob patterns for doc files to include
docsExcludestring[]["node_modules/**", ...]Glob patterns to exclude
docsLinkCodebooleantrueAuto-link doc sections to code symbols
docsContextLimitnumber0Max doc sections in kirograph_context (0 = disabled)
docsContextThresholdnumber0.5Min relevance score to include a section in context
docsMaxFileSizenumber1048576Max doc file size in bytes (1 MB)
docsSummarizationstringfirst-sentenceSummary strategy: embedding, first-sentence, or off

Build docs developers (and LLMs) love