Skip to main content
Glama

Summarize records

summarize_records
Read-only

Count, sum, average, min or max over one resource's records in one call, of any source, optionally per group. Takes the same query and filters as search_records. column is a number column from describe_resources (min and max also take a date). measures asks several figures at once, e.g. ["count", "sum", "avg"] over column, or "sum:" for another column; the answer is then values, keyed as asked. group_by is a column, week:/month:/quarter:/year:, or a list of two, e.g. ["", "month:"]. A week is named by its Monday. Groups come largest first, or in date order when a date is bucketed, at most 100.

Input Schema

NameRequiredDescriptionDefault
limitNoGroups to answer. Default and most 100.
queryNo
columnNoWhat to sum, average, min or max: a column describe_resources lists.
filtersNoColumn filters, from the columns describe_resources lists for the resource: {"<column>": "value"}, {"<column>": ["one", "another"]}, {"<column>": {"contains": "acme"}}, {"<date column>": {"gte": "2026-04-01", "lte": "2026-06-30"}}. Operators: eq, ne, in, not_in, gte, lte, contains, null.
measureNoDefault count.
group_byNoe.g. <column>, month:<date column>, or ["<column>", "quarter:<date column>"].
measuresNoSeveral figures in one call, in place of measure.
resourceYesA resource key from describe_resources, e.g. invoices.
connection_idNoOmit when only one of the company's sources holds the resource; list_connections names them.
modified_sinceNoISO 8601 time; only records the source changed since then.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • removedInput schema / properties / build_id
      Removed value: -{
      -  "description": "Omit when only one of the company's builds holds the resource; list_connections names them.",
      -  "type": "integer"
      -}
    • addedInput schema / properties / connection_id
      Added value: +{
      +  "description": "Omit when only one of the company's sources holds the resource; list_connections names them.",
      +  "type": "integer"
      +}
  2. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare it a safe read (readOnlyHint=true, destructiveHint=false), so the bar is lower; the description still adds real behavioral context beyond them: group ordering (largest first, or date order when bucketed), the hard cap of 100 groups, week-start convention (Monday), and that results are keyed to the measures asked. It stops short of describing error modes or empty-result behavior.

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?

Dense but front-loaded, leading with the capability and then resolving parameter grammars; no filler sentences. The telegraphic phrasing (e.g. 'the answer is then values, keyed as asked') is efficient though occasionally clipped for a 10-parameter tool.

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?

For a 10-parameter tool with a nested group_by shape and no output schema, the description covers the tricky parts: aggregation verbs, multi-measure output keying, group ordering, group cap, and date-bucketing syntax. connection_id and modified_since are left entirely to the schema, but those are adequately documented there, so nothing critical is 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 coverage is 90%, so baseline is 3, but the description genuinely enriches sparse schema fields: it explains the 'sum:<column>' syntax inside measures, the week:/month:/quarter:/year:<date column> grammar and two-element list form for group_by, and that min/max also accept a date column. This adds value beyond the terse schema descriptions.

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?

States a precise set of aggregation verbs (count, sum, average, min, max) over one resource's records, with optional grouping and cross-source scope. It also anchors itself against the sibling search_records ('Takes the same query and filters as search_records'), so an agent can distinguish it from row-retrieval tools like get_record/search_records without opening a schema.

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 shared-query note with search_records implies the division of labor (aggregate vs. fetch rows), but there is no explicit 'use this instead of X when Y' rule or when-not-to-use guidance. Usage is inferable rather than stated, which lands at minimum-viable.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources