Skip to main content
Glama
Treeweft

treeweft-mcp

Official
by Treeweft

hydrate_chunks

Fetch full code bodies for facet search hits by passing hit_ids in a single batched call, returning exact indexed chunks instead of file reads.

Instructions

Fetch the full code bodies for facet search hits. After a search_code call with response_mode='facet' (which returns ranked metadata + headers but NO code), pass the hit_id values of the results you care about here — in ONE batched call — to get their exact code bodies. Cheaper and more precise than read_file: it returns exactly the indexed chunk(s), reconstructing merged ranges. Returns compact markdown by default; pass response_format='json' for the structured dict.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idsYes
source_idNo
response_formatNomarkdown

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2026.9.23

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden. It discloses that facet search returns no code, that this tool returns exact indexed chunks, reconstructs merged ranges, and supports markdown or JSON output. It does not cover error behaviors or edge cases, but for a read-oriented hydration tool it provides substantial behavioral context.

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 and front-loaded: the first sentence states the core action, the second gives the workflow context, and the third covers output options. Every sentence contributes useful information without redundancy.

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?

The description is complete for the core calling pattern: it identifies the prerequisite call, the required input, the batching behavior, and the output format options. The main gap is the unexplained `source_id` parameter and the lack of guidance on failure or stale hit_id scenarios, but the output schema helps cover return values.

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?

Schema coverage is 0%, so the description must compensate. It explains that `ids` should be facet hit_ids and that `response_format` accepts 'markdown' (default) or 'json'. However, the `source_id` parameter is never mentioned, leaving one optional parameter semantically unexplained.

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's purpose: fetch full code bodies for facet search hits. It differentiates itself from alternatives by referencing the specific search_code facet flow and read_file comparison. The verb 'fetch' and resource 'code bodies' are concrete and unambiguous.

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

Usage Guidelines5/5

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

The description explicitly tells the agent when to use this tool: after a search_code call with response_mode='facet', passing the hit_id values. It also names an alternative (read_file) and explains why hydrate_chunks is cheaper and more precise, giving clear decision criteria.

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