Skip to main content
Glama

recommend_config

Runs chunking strategy benchmarks and returns ranked recommendations for your RAG corpus, helping select configuration based on retrieval quality and warnings.

Instructions

Run tuner and return ranked Recommendation (uses dummy embeddings by default).

The response adds a warnings list (e.g. when the trivial placeholder dataset is used).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "path": "<path>"
    },
    "name": "recommend_config"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes
top_kNoKept for compatibility; does NOT affect metrics or scores. Retrieval depth is the effective k = 2000-token context budget / avg chunk tokens.
max_docsNo
use_caseNorag_qa
use_cacheNoUse the SQLite embedding cache for real embedding models.
strategiesNo
content_typeNo
dataset_pathNoOptional JSON/YAML eval dataset file (must be under CHUNK_TUNER_BASE_DIR). document_id may be the file path relative to `path`, an absolute path, or the file name. Mutually exclusive with generate_dataset.
embedding_modelNo
retrieval_scopeNoRanking used for score's rank metrics: 'document' (gold document's chunks only) or 'corpus' (all chunks of all documents).document
generate_datasetNoGenerate eval questions with the server's LLM (CHUNKTUNER_LLM_MODEL; may be paid). No confirmation prompt: call evaluate_chunking with dry_run=true and generate_dataset=true first to see llm_dataset_tokens / llm_cost_usd. The dataset is cached and reused for identical documents. Default: a trivial placeholder dataset (see `warnings` in the response).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.2.1
    • addedInput schema / properties / dataset_path
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Optional JSON/YAML eval dataset file (must be under CHUNK_TUNER_BASE_DIR). document_id may be the file path relative to `path`, an absolute path, or the file name. Mutually exclusive with generate_dataset.",
      +  "title": "Dataset Path"
      +}
    • addedInput schema / properties / generate_dataset
      Added value: +{
      +  "default": false,
      +  "description": "Generate eval questions with the server's LLM (CHUNKTUNER_LLM_MODEL; may be paid). No confirmation prompt: call evaluate_chunking with dry_run=true and generate_dataset=true first to see llm_dataset_tokens / llm_cost_usd. The dataset is cached and reused for identical documents. Default: a trivial placeholder dataset (see `warnings` in the response).",
      +  "title": "Generate Dataset",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / retrieval_scope
      Added value: +{
      +  "default": "document",
      +  "description": "Ranking used for score's rank metrics: 'document' (gold document's chunks only) or 'corpus' (all chunks of all documents).",
      +  "enum": [
      +    "document",
      +    "corpus"
      +  ],
      +  "title": "Retrieval Scope",
      +  "type": "string"
      +}
    • addedInput schema / properties / top_k / description
      Added value: +"Kept for compatibility; does NOT affect metrics or scores. Retrieval depth is the effective k = 2000-token context budget / avg chunk tokens."
    • addedInput schema / properties / use_cache
      Added value: +{
      +  "default": true,
      +  "description": "Use the SQLite embedding cache for real embedding models.",
      +  "title": "Use Cache",
      +  "type": "boolean"
      +}
  2. First observedv0.1.1

TDQS

C2.7/5.0
Behavior3/5

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

No annotations exist, so the description carries the full burden, and it does disclose one genuinely important trait: results come from dummy embeddings by default, so scores are not meaningful embeddings-wise. It also flags the warnings list and the placeholder-dataset caveat. However it says nothing about cost/runtime, file-system reads under a base dir, cache writes, or side effects of running the tuner.

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?

Two short sentences, front-loaded with the action and then the return caveat, with no filler. Minor noise from reStructuredText double-backtick markup, which reads as copy-pasted docstring rather than agent-facing prose.

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

Completeness2/5

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

For an 11-parameter tuning tool with no annotations and no output schema, the description is far too thin: it explains neither inputs, nor runtime/cost expectations, nor the shape of the returned Recommendation beyond a warnings list. An agent could not reliably decide when to invoke this or how to interpret its output from the definition.

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

Parameters2/5

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

Eleven parameters with only 45% schema description coverage, and the description mentions none of them — not `path`, `strategies`, `content_type`, `max_docs`, `embedding_model`, or the document/corpus `retrieval_scope`. With coverage below 50% the description was expected to compensate for the undocumented parameters, and it adds zero meaning beyond the schema.

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

Purpose3/5

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

The description gives a verb and result object ("Run tuner and return ranked Recommendation"), but "tuner" is undefined jargon — it never says what is being tuned (chunking strategy/config) or that it operates on the repo at `path`. It also does not distinguish this tool from siblings such as evaluate_chunking, which sounds like it performs an overlapping evaluation.

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

Usage Guidelines2/5

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

There is no when-to-use or when-not-to-use guidance and no mention of alternatives, despite three plausible siblings. The only routing hint (call evaluate_chunking with dry_run=true and generate_dataset=true first to preview cost) lives in the generate_dataset schema description, not here, so an agent reading the description alone would not know the recommended sequence.

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