Skip to main content
Glama
k-rister

ephemeral-buffer

by k-rister

capture_file

Ingest a file's contents into an ephemeral search index for hybrid retrieval. Specify a file path and optional label, metrics, or byte limit to get a JSON summary.

Instructions

Reads a file or log output from disk and ingests it into the ephemeral search index. Returns a compact versioned JSON summary and preserves optional named metrics in structured_metrics.

Validate the intended file path before calling: resolve symlinks when path identity matters, confirm the file belongs to the expected workspace, and use an explicit bounded max_bytes for large or untrusted files. Capture limits control output handling; they do not validate filesystem intent.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
labelNo
file_pathYes
max_bytesNo
content_typeNoauto
structured_metricsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.5.0
    • addedInput schema / properties / structured_metrics
      Added value: +{
      +  "anyOf": [
      +    {
      +      "additionalProperties": true,
      +      "type": "object"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Structured Metrics"
      +}
  2. 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 provided, the description carries the full behavioral burden, and it handles this well: it discloses what the tool does (ingests into ephemeral search index), what it returns (compact versioned JSON summary), what it preserves (named metrics in structured_metrics), and an important nuance about limit semantics not validating filesystem intent. It doesn't describe error behavior or what happens on oversized files, but the provided behaviors are disclosed.

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 focused paragraphs with the primary purpose front-loaded in the first sentence. The second paragraph earns its place by conveying safety-critical file-handling guidance. No filler or repetition of the schema; every sentence contributes new information, though it could be slightly tightened.

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

Completeness3/5

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

The tool has 5 parameters, an output schema (which covers the return format), and no annotations. The description adequately covers purpose, return behavior, and file-path validation, but leaves label and content_type semantics unexplained. For a file-ingestion tool with output schema present, it's close but not fully complete—an agent might misuse label or content_type without schema-level descriptions.

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 description coverage is 0%, so the description must compensate. It explicitly explains max_bytes ('use an explicit bounded max_bytes for large or untrusted files'), file_path (via the validation guidance), and structured_metrics ('preserves optional named metrics'). However, it never addresses label or content_type, leaving two of five parameters undocumented in both schema and description, so compensation is only partial.

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 uses a specific verb ('Reads a file or log output from disk and ingests it') with a clear resource, distinguishing itself from siblings like capture_text (which would capture text directly) and execute_and_capture (which captures execution output). It also states the output format ('compact versioned JSON summary') and the optional structured metrics, making the tool's distinct purpose unambiguous.

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 second paragraph gives concrete pre-call guidance: resolve symlinks when path identity matters, confirm workspace membership, and use a bounded max_bytes for large/untrusted files. It also clarifies the boundary condition ('Capture limits control output handling; they do not validate filesystem intent'). It provides clear context for safe usage, though it doesn't explicitly name alternatives or state when NOT to use this tool in favor of a sibling.

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