Skip to main content
Glama

bundle_search

Run a full-text search and combine matching file bodies into a single prompt-ready bundle (XML or markdown), capped by token budget.

Instructions

Run an FTS search and concatenate matched bodies into a single prompt-ready bundle (XML <document> blocks or markdown headers + fences) capped at max_tokens. Files are added in rank order until the next would exceed the budget; the rest go to skipped[]. Read-only; no side effects, auth, or rate limits. Use instead of search + N×read_file when you need several related files as one context blob. Defaults: format=xml, max_tokens=50000. project_id: null = KB only; tags[] requires ALL to match.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesFull-text search query
project_idNoFilter by project ID. Pass null to bundle ONLY Knowledge Base files.
tagsNoFilter by tags (all must match)
favoriteNoFilter by favorite status
formatNoBundle format. xml = Anthropic-recommended <document> tags; markdown = ## headers + fenced blocksxml
max_tokensNoToken budget. Files added in rank order until the next would exceed; remainder go to skipped[]
Behavior5/5

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

Despite no annotations, description discloses read-only nature, no side effects, auth, or rate limits, and explains the token-budget allocation and format options in detail.

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?

Concise (~100 words) yet comprehensive, with front-loaded purpose, clear structure, and no redundant information.

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?

Given no output schema and no annotations, the description covers purpose, behavior, parameters, usage guidelines, and constraints fully, leaving no gaps for an agent to misuse.

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?

All 6 parameters are documented in the schema; description adds extra context (e.g., null project_id means Knowledge Base only, tags require ALL match) and clarifies format differences.

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?

Description clearly states the tool performs an FTS search and bundles results into a prompt-ready format (XML or markdown), distinguishing it from sibling tools like 'search' and 'read_file'.

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?

Explicitly recommends using this tool instead of 'search' + N×'read_file' for bundling multiple related files, and describes the capped-token behavior and defaults.

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/safiyu/ctxnest'

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