Skip to main content
Glama

aggregate_records

Group and aggregate Odoo records server-side with a single call. Supports sums, averages, counts, and more over specified fields and groups.

Instructions

Group and aggregate records server-side (one call instead of pulling rows).

Args: model: Technical model name, e.g. 'sale.order'. group_by: One or more fields to group on. A field may carry a granularity, e.g. 'date_order:month'. measures: 'field:agg' specs. Bare 'field' means sum. Allowed aggregators: sum, avg, min, max, count, count_distinct. Omit to count records. domain: Odoo search domain (list of triplets). Defaults to all records. limit: Max groups (capped by ODOO_MAX_RECORDS). offset: Pagination offset over groups. order: Sort spec, e.g. 'amount_total desc'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
modelYes
orderNo
domainNo
offsetNo
group_byYes
measuresNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations, description carries full burden. It explains aggregation behavior, available aggregators, default actions (e.g., omit measures to count records), and a cap on limit. Does not explicitly state read-only nature, but server-side aggregation implies no mutation.

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

Conciseness5/5

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

Description is front-loaded with purpose, followed by a clear list of parameters. Every sentence is informative, no fluff or repetition. Efficient and well-structured.

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?

Covers all input parameters including optional ones, provides examples, and mentions system limits (ODOO_MAX_RECORDS). Output schema exists, so return format is not needed in description. Complete for a complex tool with 7 parameters.

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 coverage is 0%, so description fully explains all 7 parameters. Provides syntax examples (e.g., 'date_order:month'), allowed aggregators, defaults, and usage notes. This compensates for missing schema descriptions and adds significant value.

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?

Clearly states 'Group and aggregate records server-side', which is a specific verb-resource combination. Distinguishes itself from raw data retrieval tools like read_records or search_read by emphasizing server-side aggregation.

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?

Provides context for use ('one call instead of pulling rows') and detailed parameter explanations, but lacks explicit 'when not to use' or direct comparison to sibling tools. However, the description is sufficient for an informed choice.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/minhhq-a1/odoo-pulse'

If you have feedback or need assistance with the MCP directory API, please join our Discord server