Skip to main content
Glama

compile_ontology

Read-only

Compile a Markdown vault into a deterministic graph of canonical nodes, edges, aliases, and issues. Returns a graphHash for cache invalidation, with summary and pagination options.

Instructions

Compile the whole markdown vault into a deterministic graph artifact: canonical nodes, edges, aliases, graph issues, graph-array canonicalization actions, and optional adjacency indexes. This is the compiler-style read path for graph-database-like use: call it before advanced reasoning, indexing, export, or non-developer-friendly graph views. Includes a stable semantic graphHash and maxMtime for cache invalidation. side effect 0. Large vaults (100+ nodes) can exceed the MCP token cap with the default full payload — use summary: true for cheap polling (counts + graphHash, no arrays), or nodesLimit/nodesOffset / edgesLimit/edgesOffset to slice arrays. The response includes nodesPagination / edgesPagination meta with {offset, limit, total, returned, hasMore, nextOffset} when sliced.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
summaryNoWhen true, omit `nodes` / `edges` / `aliases` / `ambiguousAliases` / `canonicalizationActions` / `indexes` arrays — return only `graphHash`, `maxMtime`, counts (`nodeCount`/`edgeCount`/`aliasCount`/...), and aggregate `byKind`/`byDomain` as counts. Cheap polling for cache invalidation and graph-size assessment.
edgesLimitNoPositive integer max edges to return. Pair with `edgesOffset` to paginate. Max 500.
nodesLimitNoPositive integer max nodes to return. Pair with `nodesOffset` to paginate. Omit for unlimited (backward compat), max 500 when provided.
edgesOffsetNoNon-negative integer starting index in the sorted edges array. Defaults 0.
nodesOffsetNoNon-negative integer starting index in the sorted nodes array. Defaults 0.
includeIndexesNoWhen true, include indexes `{out, in, byKind, byDomain, edgeById, aliasToSlug, uidToSlug, slugToUid, mergedUidToSlug}`. Graph traversal remains slug-based; UID indexes provide exact identity resolution. Defaults false to keep payload smaller.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
edgesNo
nodesNo
byKindYes
issuesNo
aliasesNo
indexesNo
summaryNo
versionYes
byDomainYes
maxMtimeYes
edgeCountYes
graphHashYes
nodeCountYes
aliasCountYes
issueCountYes
edgesPaginationNo
nodesPaginationNo
ambiguousAliasesNo
externalEdgeCountYes
resolvedEdgeCountYes
ambiguousAliasCountYes
unresolvedEdgeCountYes
canonicalizationActionsNo
canonicalizationActionCountYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.13.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the description correctly adds 'side effect 0' and explains determinism and the stable graphHash/maxMtime for cache invalidation. It also warns about token cap and explains pagination behavior, which are useful beyond the annotations. No contradiction with annotations.

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 description is a single, well-structured paragraph that front-loads the core purpose, then provides usage details on pagination and summary. Every sentence contributes new information; there is no fluff. It's a bit long but justified given the tool's complexity.

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

Completeness5/5

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

For a complex tool with 6 parameters and an output schema, the description covers all critical aspects: purpose, usage timing, token cap mitigation, pagination, summary mode, and side effects. It explains the response meta and cache invalidation, so an agent has enough context to call it correctly without missing critical details.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents each parameter. The description adds value by explaining usage patterns such as 'use summary: true for cheap polling' and how to slice arrays with nodesLimit/nodesOffset. It also mentions the pagination meta in the response, which is not in the schema. This goes beyond the schema and helps the agent choose parameters appropriately.

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?

The description states a specific verb ('Compile'), a resource ('whole markdown vault'), and the resulting artifact ('deterministic graph artifact' with nodes, edges, aliases, etc.). It clearly distinguishes itself from sibling tools by calling itself 'the compiler-style read path' and describing its intended use case, so an agent can easily tell it apart from query or get tools.

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

Usage Guidelines4/5

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

The description provides explicit context for when to use the tool: 'call it before advanced reasoning, indexing, export, or non-developer-friendly graph views.' It also explains how to handle large vaults with summary and pagination options, giving practical guidance. It doesn't explicitly name alternatives or exclusions, but the context is clear enough to guide an agent.

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