KiroGraph’s docs module indexes your project’s written documentation alongside the code graph, making it queryable at section granularity. Instead of loading entire files, the agent retrieves only the sections it needs — achieving 92–97% token savings on typical doc-heavy codebases. All tools requireDocumentation 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.
enableDocs: true in .kirograph/config.json and a completed kirograph index run.
Supported formats: Markdown (
.md), MDX (.mdx), reStructuredText (.rst), AsciiDoc (.adoc), and OpenAPI specs (.yaml/.json). Sections are split at heading boundaries and addressed by stable heading-path IDs.Stable Section IDs
Every indexed section receives a stable ID — a deterministic string derived from the file path and the full ancestor heading chain. Because the ID encodes the structural position rather than a byte offset, it survives file reformatting and minor edits elsewhere in the file as long as the heading text and hierarchy don’t change. The ID format is:{file-path}::{ancestor-slug/.../heading-slug}#{level}, for example docs/auth.md::authentication/jwt-strategy#2.
file-path— project-relative path to the doc file.ancestor-slug/.../heading-slug—/-joined slugified titles of all ancestor headings down to the section itself (GitHub-style slugification: lowercase, spaces→hyphens, special chars removed).level— heading level (1–6).
kirograph_docs_toc, kirograph_docs_search, and kirograph_docs_outline. Pass them directly to kirograph_docs_section to retrieve the full section content without re-running a search query.
kirograph_docs_toc
Get the table of contents for the entire project or a specific file. Each entry includes the heading text, heading level, file path, section summary (when available), and the stable section ID.
Filter to a specific doc file. Omit for a project-wide TOC.
Return a nested tree structure (children nested under parent headings). Defaults to
false (flat list).Project root path. Defaults to the current working directory.
Example output (flat)
kirograph_docs_search
Search documentation sections by a natural-language query or keyword. Uses full-text search (FTS) and, when a vector engine is configured, semantic search as a fallback. Returns sections ranked by relevance with their summaries and stable IDs.
Natural-language or keyword search query.
Narrow the search to a specific doc file.
Maximum sections to return. Defaults to
10.Project root path. Defaults to the current working directory.
Example: find sections about rate limiting
Example output
kirograph_docs_section
Retrieve the full content of a documentation section by its stable ID. This is the token-efficient retrieval path: you first scan the TOC or run a search to find section IDs, then fetch only the sections you need. Pass context: true to include the ancestor heading chain and child section summaries alongside the content.
Stable section ID from
kirograph_docs_toc, kirograph_docs_search, or kirograph_docs_outline.When
true, includes the breadcrumb (ancestor headings) and a list of immediate child sections with their summaries. Defaults to false.Project root path. Defaults to the current working directory.
Example: fetch a section by ID
Example output (with context: true)
Child sections:
- Configuring Headers — return
X-RateLimit-*headers (ID: docs/api/limits.md::rate-limiting/configuring-headers#3) - Per-user vs Global limits (ID: docs/api/limits.md::rate-limiting/per-user-vs-global-limits#3)
Example output
kirograph_docs_refs
Bidirectional cross-reference lookup. Given a section ID, returns the code symbols that section references. Given a symbol qualified name, returns the documentation sections that mention it — with relevance scores. This is the bridge between the graph and the docs index.
Section ID — returns code symbols referenced by this section.
Code symbol qualified name — returns documentation sections that reference this symbol.
Project root path. Defaults to the current working directory.
Provide either
sectionId or nodeId, not both. Providing neither returns an error.Example output (nodeId lookup)
Token-Efficient Retrieval Pattern
The typical three-step workflow uses only the content you need, never loading full documentation files:Search or browse for relevant sections
Run a semantic search to find section IDs without fetching content:Note the section IDs from the results (e.g.
docs/auth.md::authentication#2).Fetch only the sections you need
Retrieve the content of a specific section by its stable ID — no full-file load:A 200-section documentation file might be 180 KB; the targeted section is typically 800–2 000 bytes.
