Skip to main content
Glama
SAP connector for Claude

SAP connector for Claude

aggregate_sap_table

Compute SAP table totals in one call using SUM, AVG, MIN, MAX, COUNT, or COUNTD with filters and grouping, avoiding row paging for finance reporting.

Instructions

Totals computed in SAP: one call instead of paging rows. measures: comma list of SUM:f, AVG:f, MIN:f, MAX:f, COUNT, COUNTD:f (results named SUM_HSL, ROW_COUNT, COUNTD_BELNR...). group_by: comma fields (empty = one row). where: ABAP Open SQL. order_by: result columns, e.g. "SUM_HSL DESC" with top=20. top max 1000. E.g. TB: table=ACDOCA, measures=SUM:HSL, group_by=RACCT, where="RLDNR = '0L' AND RBUKRS = '1000' AND GJAHR = '2026'".

Input Schema

NameRequiredDescriptionDefault
topNo
tableYes
whereNo
group_byNo
measuresNoCOUNT
order_byNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.7.7

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does disclose meaningful behavior: result column naming (SUM_HSL, ROW_COUNT, COUNTD_BELNR), that empty group_by collapses to a single row, and that top is capped at 1000. It does not mention connection/auth prerequisites or how invalid field names are reported, and an output schema already covers the return shape.

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: the purpose leads, then each parameter is dispatched in a short clause, then a worked example. The telegraphic style ('E.g. TB:', 'comma list of') is efficient but occasionally terse enough to require a second read.

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 six-parameter aggregation tool with an output schema already defined, the description supplies the query grammar, limits, and a full example, which is what an agent needs to construct a correct call. Remaining gaps are environmental (SAP connection state, error semantics) rather than call-construction gaps.

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%, so the description must carry all parameter meaning, and it does: the allowed measure grammar (SUM/AVG/MIN/MAX/COUNT/COUNTD with field suffix), group_by semantics including the empty case, where as ABAP Open SQL, order_by referencing result columns with a concrete 'SUM_HSL DESC' with top=20 pairing, and the top ceiling. Only 'table' is left implicit, which is acceptable given the example.

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+resource: SAP-side totals ('Totals computed in SAP') and contrasts with row-by-row retrieval ('one call instead of paging rows'), which implicitly separates it from read_sap_table. It never names the sibling explicitly, so the differentiation is inferred rather than stated.

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 'one call instead of paging rows' framing tells the agent this is for aggregation rather than raw row extraction, and the worked TB/ACDOCA example shows a realistic invocation. It stops short of explicit when-not guidance (e.g., use read_sap_table when you need individual rows or columns not covered by measures).

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