Skip to main content
Glama
odoo-safe-mcp
by makelele29

odoo_aggregate

Read-onlyIdempotent

Aggregate Odoo records into read-only grouped totals and counts by specified fields, using domains and limits to summarize data for analysis and reporting.

Instructions

Aggregate records (read_group): totals and counts grouped by fields. Read-only.

Example: model='sale.order', groupby=['state'], fields=['amount_total:sum'].

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "model": "<model>",
      "groupby": "<groupby>"
    },
    "name": "odoo_aggregate"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNo
modelYes
domainNo
fieldsNo
groupbyYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv3.0.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so 'Read-only' in the description is redundant. It does add that the call maps to Odoo's read_group semantics, but says nothing about how domain filtering interacts with totals, what limit applies to (groups vs records), or any permission requirements.

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?

One declarative sentence plus one worked example, with the purpose front-loaded and zero filler. Every element earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists so return values need no explanation, but for a 5-parameter tool with zero schema descriptions the definition leaves domain format, limit scope, and groupby syntax (e.g. date granularity) unexplained.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/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 compensate; its example does explain the non-obvious aggregate syntax in fields ('amount_total:sum'), which the schema cannot convey. However, domain (array-or-string) and limit (what it caps) remain undocumented in both places.

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 and resource ('Aggregate records') and names the underlying Odoo operation (read_group) plus the output shape (totals and counts grouped by fields). This distinguishes it from odoo_count and odoo_search implicitly, but the siblings are never named.

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 worked example ('model=sale.order, groupby=[state], fields=[amount_total:sum]') implies the intended use case, but there is no explicit when-to-use, when-not-to-use, or pointer to odoo_count for simple counts or odoo_search for raw records.

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