Skip to main content
Glama
k-rister

ephemeral-buffer

by k-rister

search_capture

Search captured command output by keyword, semantic meaning, or hybrid ranking to find errors, logs, and context without rerunning commands.

Instructions

Searches the captured command output using BM25, Semantic embedding, or Hybrid (RRF) ranking. Semantic prefetch is on by default. Hybrid search waits at most the configured semantic wait budget for an active index job and may return BM25 results marked pending while that job continues. Semantic indexing is bounded by a per-capture input-byte budget and token-budgeted inference batches. Captures over the input budget use immediate BM25 fallback for semantic and hybrid searches; semantic mode waits for indexing unless the capture exceeds that budget.

Args: query: Search keywords or natural language question (e.g. 'auth failure', 'ECONNREFUSED', 'why did the build fail?'). mode: Search mode - 'hybrid' (recommended, lexically weighted BM25 + Semantic), 'bm25' (keyword terms), or 'semantic' (vector concepts). capture_id: The capture ID to query (defaults to 'latest'). top_k: Number of matching snippets to return (default: 5). context_lines: Number of surrounding lines of context to include with each match (default: 3; must be non-negative).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNohybrid
queryYes
top_kNo
capture_idNolatest
context_linesNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4/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 burden and does so unusually well: it discloses that hybrid may return BM25 results marked 'pending' while an index job continues, that semantic indexing is bounded by per-capture byte and token budgets, and that oversized captures fall back to immediate BM25. It omits permission/auth requirements, but the latency, fallback, and pending-state semantics are exactly the kind of hidden behavior an agent needs.

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?

Purpose is front-loaded in sentence one, followed by behavioral caveats and then a clean Args list; nothing is wasted in a structural sense. The budget/wait prose is somewhat dense and partially repetitive (budget behavior is explained twice), which keeps it from a 5.

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?

Complexity here is high, but the description covers the ranking modes, the default prefetch, timeout and fallback behavior, and all five parameters; an output schema exists so return values needn't be explained. An agent could call this correctly from the description alone, with only auth/permission context missing.

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 0% across 5 parameters, so the description must compensate, and it largely does: it names every parameter, gives query examples, spells out the three mode values with their meanings, and adds the 'must be non-negative' constraint on context_lines. top_k and capture_id are only restated from the schema defaults, leaving marginal room to improve.

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

Purpose4/5

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

The first sentence gives a specific verb (Searches) and resource (captured command output) plus the ranking mechanisms (BM25, Semantic, Hybrid/RRF), which lets an agent separate this from retrieval siblings like get_capture_slice or get_capture_summary. It stops short of naming those siblings to draw the boundary explicitly.

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 makes the mode trade-off explicit ('hybrid' is recommended, 'bm25' for keyword terms, 'semantic' for vector concepts) and states the semantic prefetch default, so mode selection is well-supported. It does not state when *not* to use this tool or how it compares to the other capture-reading tools, so it falls short of a full 5.

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