Skip to main content
Glama
solutionsunity

OdooSurface MCP

read_group

Count and aggregate Odoo records by grouped fields, with domain filters and date granularity. Returns per-group counts and aggregate values for reporting or list-view-style summaries.

Instructions

Count and aggregate records per group — as the list view grouped by a field shows them. groupby: field names, dates with a granularity ("create_date:month"; day|week|month|quarter|year); empty for one total. aggregates: "field:agg" specs (sum, avg, min, max, count_distinct, …). domain filters the records first. Returns [{: value, __count, : value}] — many2one values as [id, name], date groups as [range start, label].

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelYes
domainNo
contextNo
groupbyYes
aggregatesNo
output_pathNoAbsolute path on the MCP server host. When given, the full JSON result is written there and the tool returns only {output_path, total, count} — for results too large for context or meant for scripts.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.6.1

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden and does disclose the return contract in detail — an array of {<groupby>: value, __count, <aggregate>: value} with many2one and date-group representations — which is real added value. It stops short of stating read-only nature, result limits, or pagination for large groupings.

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 and front-loaded: purpose first, then per-parameter syntax, then return shape. Every clause carries information, though the single unbroken paragraph and stacked parentheticals make it slightly heavy to scan.

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?

No output schema exists, and the description compensates by specifying the result shape, so an agent knows what it will get back. Remaining gaps are the unexplained model/context parameters and any limits on group cardinality or result size.

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 only 17%, so the description must compensate, and it does for the key parameters: groupby syntax including date granularity values (day|week|month|quarter|year), aggregates 'field:agg' specs with named functions, and domain's filter-first semantics. model and context remain unexplained, leaving some gap.

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 specific verb and resource — 'Count and aggregate records per group' — and anchors it to a familiar analogue ('as the list view grouped by a field shows them'), which cleanly separates it from list_records/search_records in the sibling set.

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?

Usage is implied rather than stated: 'empty for one total' hints at the single-total case and the list-view analogy implies grouping intent, but there is no explicit when-to-use vs. list_records/search_records, no when-not, and no prerequisites.

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