Skip to main content
Glama

capture_aggregate

Read-onlyIdempotent

Aggregate a saved capture by ID to compute stats, count lines, list unique lines, or extract/count regex matches.

Instructions

Aggregate over a capture: stats|count_lines|unique_lines|extract:|count:.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
patternNoRegex when transform is 'extract' or 'count' without inline regex.
transformNostats (default) | count_lines | unique_lines | extract | count | extract:<regex> | count:<regex>

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv4.0.0

TDQS

C2.9/5.0
Behavior2/5

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

Annotations already declare readOnly, idempotent, non-destructive, so safety is covered. The description adds no behavioral context beyond the transform vocabulary that already lives in the schema - nothing about what the id refers to, cost, or result shape for a read-only aggregation.

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?

A single front-loaded sentence with the operation modes listed compactly. No filler, though the brevity borders on under-specification of the modes' semantics.

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?

For a read-only tool with safety annotations and no output schema, the essentials are sparse. The description omits what the required id references and how each transform behaves, which an agent would need to call the mode variants correctly.

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 67% and the schema already documents transform and pattern. The description partially mirrors the transform enum but adds no meaning beyond it and says nothing about the required id parameter, so it does not compensate for the coverage gap.

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?

States a specific verb (aggregate) and resource (capture) and enumerates the aggregation modes, which separates it from capture_get, capture_search, and capture_list. It is less explicit than ideal about what a 'capture' is, but the intent is readable.

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

Usage Guidelines2/5

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

No when-to-use guidance and no alternatives named. It never explains when to pick stats vs count_lines vs extract vs count, nor how this differs from pull-oriented siblings like capture_get or capture_list, leaving selection to inference.

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