Skip to main content
Glama
k-rister

ephemeral-buffer

by k-rister

search_capture

Search captured command output using BM25, semantic, or hybrid retrieval to locate relevant snippets with surrounding context. Diagnose issues by querying keywords or natural language questions.

Instructions

Searches the captured command output using BM25, Semantic embedding, or Hybrid (RRF) ranking. When opt-in semantic prefetch is enabled, semantic and hybrid searches wait for the relevant background index job; failed jobs fall back to synchronous lazy indexing.

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.2/5.0
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 and handles it well by explaining ranking modes and the background-indexing behavior for semantic/hybrid searches. It stops short of describing error behavior or result format, but those are partly covered by the existing output schema.

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 well-structured: a concise purpose sentence, a conditional behavior note, and a clear Args list with no filler. 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.

Completeness5/5

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

Given the tool's moderate complexity, the description covers the search modes, indexing behavior, and all five parameters thoroughly. Since an output schema exists, omitting a detailed return format explanation is acceptable, making this definition effectively complete.

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

Parameters5/5

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

Schema description coverage is 0%, yet the description fully compensates by explaining every parameter with purpose, allowed values, examples, defaults, and constraint details like context_lines being non-negative. This is exemplary parameter documentation beyond the raw schema.

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 description clearly states the verb and resource: it searches captured command output, and specifies three ranking methods. It does not explicitly distinguish this tool from siblings like get_capture_slice or capture_text, but the scanning/search intent is unmistakable.

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 gives usage context through query examples and recommends the 'hybrid' mode, implying when it is the appropriate search choice. However, it does not state when to use this tool over sibling tools such as list_captures or get_capture_slice, nor does it mention exclusions.

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