Skip to main content
Glama

docs_compile

Cluster related document chunks by embedding similarity and generate cross-referenced concept articles, improving retrieval for complex queries.

Instructions

Compile a domain's raw document chunks into synthesized concept articles with cross-references. Uses LLM to cluster related chunks by embedding similarity and generate markdown articles. Compiled articles are stored back in the domain's vector DB under compiled/ paths, improving retrieval quality for complex queries.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
domainYesDomain name to compile (e.g., 'sonic-pi', 'touchdesigner')
maxClustersNoMaximum number of concept clusters to generate (default 20)
clusterThresholdNoCosine similarity threshold for clustering chunks (0-1, default 0.35). Lower = larger clusters.
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It explains that the tool uses LLM clustering by embedding similarity, generates markdown articles, and stores them back under compiled/ paths in the vector DB. This provides meaningful context, though it does not disclose overwrite behavior or prerequisites for existing raw chunks.

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

Conciseness5/5

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

The description is concise, consisting of three sentences with the main action front-loaded. It avoids redundancy and every sentence adds value, making it well-structured for quick comprehension.

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

Completeness4/5

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

Given the tool has three parameters, no output schema, and no annotations, the description covers the core behavior, purpose, and storage location sufficiently. It lacks explicit return value and prerequisites, but for a data processing tool of this complexity, it is mostly complete.

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?

The schema covers 100% of parameters with descriptions, so the baseline is 3. The tool description adds minimal parameter-specific meaning, only lightly connecting clustering to the threshold parameter. It does not elaborate on how maxClusters or clusterThreshold affect output in detail.

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 clearly states the tool compiles raw document chunks into synthesized concept articles with cross-references, specifying the verb, resource, and output. It distinguishes itself from sibling tools like docs_search and docs_ingest by focusing on the aggregation/compilation step rather than retrieval or ingestion.

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?

The description implicitly suggests use for improving retrieval quality on complex queries, but does not explicitly state when to use this tool versus alternatives or when not to use it. There is no comparison with docs_search or docs_ingest, and no exclusions are provided.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/kcdjmaxx/HomarUScc'

If you have feedback or need assistance with the MCP directory API, please join our Discord server