Skip to main content
Glama
This connector has been deprecated

This connector has been replaced by https://glama.ai/mcp/connectors/io.phas/phasio

aggregate

Read-onlyIdempotent

Aggregate a dataset: sum/avg/count/min/max of a field, optionally grouped by one or more fields, with an optional RSQL filter. Use this for cross-cutting questions like highest-value customers (aggregate order, sum, localPrice, groupBy=[customerOrganisationName], filter="state==ORDER") or revenue by process. Datasets that carry a voided/deleted flag exclude those rows by default (see the Scope line from describeQueryableFields); line-item datasets like requisition are NOT scoped by their parent order's status, so filter explicitly for placed-orders-only revenue. Datasets: order, partRevision, partSpecification, productionStep, customerOrganisation, cart, requisition, workOrder, processPrices, materialPrices, postProcessing, typescriptEquation, operationScheduling, operation, batchMovement, scrap, material, color, jurisdiction, leadTime, precisionPrices, infill, taxJurisdiction, taxComponent, paymentTerm, discount, shippingBox, shippingMethod, productionResource, routingTemplate, kanbanColumn, documentTemplate. Call describeQueryableFields(entity) for valid field names.

Input Schema

NameRequiredDescriptionDefault
sortNo'asc' or 'desc' by the metric value (default desc).
fieldNoNumeric field to aggregate (required for all metrics except count). Use describeQueryableFields(entity) for valid names.
limitNoMax groups to return (1-50, default 20).
entityYesDataset to aggregate. One of: order, partRevision, partSpecification, productionStep, customerOrganisation, cart, requisition, workOrder, processPrices, materialPrices, postProcessing, typescriptEquation, operationScheduling, operation, batchMovement, scrap, material, color, jurisdiction, leadTime, precisionPrices, infill, taxJurisdiction, taxComponent, paymentTerm, discount, shippingBox, shippingMethod, productionResource, routingTemplate, kanbanColumn, documentTemplate.
filterNoOptional RSQL filter applied before aggregating (same syntax as query).
metricYessum, avg, count, min or max.
groupByNoOptional fields to group by (e.g. customerOrganisationName, technology). Omit for a single total.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / entity / description
      Previous value: -"Dataset to aggregate. One of: order, partRevision, partSpecification, productionStep, customerOrganisation, cart, requisition, workOrder, processPrices, materialPrices, postProcessing, typescriptEquation, operation, batchMovement, scrap, material, color, jurisdiction, leadTime, precisionPrices, infill, taxJurisdiction, taxComponent, paymentTerm, discount, shippingBox, shippingMethod, routingTemplate, kanbanColumn, documentTemplate."New value: +"Dataset to aggregate. One of: order, partRevision, partSpecification, productionStep, customerOrganisation, cart, requisition, workOrder, processPrices, materialPrices, postProcessing, typescriptEquation, operationScheduling, operation, batchMovement, scrap, material, color, jurisdiction, leadTime, precisionPrices, infill, taxJurisdiction, taxComponent, paymentTerm, discount, shippingBox, shippingMethod, productionResource, routingTemplate, kanbanColumn, documentTemplate."
  2. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already establish that this is a safe, idempotent read, and the description goes well beyond them by disclosing two result-changing behaviors: datasets with a voided/deleted flag silently exclude those rows by default, and line-item datasets like requisition are NOT scoped by their parent order's status. Those are exactly the non-obvious traps that would otherwise produce quietly wrong revenue numbers, and it even points to the Scope line in describeQueryableFields.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The first half is well front-loaded and dense with value, but the 31-item dataset list consumes roughly a third of the text and simply repeats the `entity` property description verbatim from the schema — space that earns nothing. Removing it would shorten the description substantially without losing information.

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?

With seven parameters all documented, full schema coverage, and read-only annotations, the description covers the pieces an agent actually needs: valid metrics, how to find field names, and the scoping caveats that affect correctness. Return-shape detail is the only soft spot, and for an aggregate result (group keys plus metric value) its absence is low-risk.

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 100%, so the baseline is 3, but the description adds meaning on top: groupBy can take one or more fields (omit for a single total), filter uses the same RSQL syntax as query, and field names must come from describeQueryableFields. The worked example with real field names (localPrice, customerOrganisationName) makes the metric/field/groupBy interaction concrete rather than abstract.

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 opening sentence names a specific verb (aggregate) plus the exact metric set (sum/avg/count/min/max), optional grouping, and optional RSQL filter, so the operation is fully pinned down. It is clearly separable from the `query` sibling by being an aggregation rather than a row-returning read.

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?

It supplies concrete use cases ('highest-value customers', 'revenue by process') plus a real invocation shape (metric=sum, field=localPrice, groupBy=[customerOrganisationName], filter="state==ORDER"), which tells the agent when this tool is the right pick. What is missing is an explicit negative case — e.g. 'use query instead when you need individual rows rather than totals' — so the boundary with `query` is only implied.

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