Skip to main content
Glama
erpipe-org

Odoo MCP Server

by erpipe-org

aggregate_records

Read-onlyIdempotent

Group Odoo records by specified fields and compute aggregate measures like sums and counts using server-side Postgres operations. Apply domain filters for targeted analysis.

Instructions

Aggregate Odoo records server-side using Postgres groupby/sum/count. Uses formatted_read_group on Odoo 19+ and read_group on earlier versions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
lazyNo
limitNo
modelYes
orderNo
domainNo
offsetNo
group_byYes
instanceNo
measuresNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
rowsNoAggregated group rows.
toolNoReporting tool name.
errorNoSanitized error message when success is false.
modelNo
methodNoformatted_read_group (19+) or read_group.
successYesFalse when the call failed; see error.
group_byNo
measuresNo
row_countNo
major_versionNo
fallback_reasonNo

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed15 schema fields changedv1.1.0
    • addedOutput schema / additionalProperties
      Added value: +true
    • addedOutput schema / properties / error
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Sanitized error message when success is false.",
      +  "title": "Error"
      +}
    • addedOutput schema / properties / fallback_reason
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Fallback Reason"
      +}
    • addedOutput schema / properties / group_by
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Group By"
      +}
    • addedOutput schema / properties / major_version
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Major Version"
      +}
    • addedOutput schema / properties / measures
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Measures"
      +}
    • addedOutput schema / properties / method
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "formatted_read_group (19+) or read_group.",
      +  "title": "Method"
      +}
    • addedOutput schema / properties / model
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Model"
      +}
    • removedOutput schema / properties / result
      Removed value: -{
      -  "additionalProperties": true,
      -  "title": "Result",
      -  "type": "object"
      -}
    • addedOutput schema / properties / row_count
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Row Count"
      +}
    • addedOutput schema / properties / rows
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "additionalProperties": true,
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Aggregated group rows.",
      +  "title": "Rows"
      +}
    • addedOutput schema / properties / success
      Added value: +{
      +  "description": "False when the call failed; see error.",
      +  "title": "Success",
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / tool
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Reporting tool name.",
      +  "title": "Tool"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "result"
      -]New value: +[
      +  "success"
      +]
    • changedOutput schema / title
      Previous value: -"aggregate_recordsOutput"New value: +"AggregateRecordsResponse"
  2. Changed1 schema field changedv1.0.0
    • addedInput schema / properties / instance
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Instance"
      +}
  3. Addedv0.3.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint, so the safety profile is clear. The description adds a bit of behavioral context by mentioning the version-specific read_group methods, but does not disclose other traits like error behavior or performance implications.

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?

The description is a single sentence that front-loads the purpose. It is concise, but could be slightly more structured to separate the purpose from the implementation detail.

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

Completeness2/5

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

With 9 parameters and no inline parameter explanations, the description is insufficient for an agent to use the tool correctly. The presence of an output schema partially compensates for return value documentation, but parameter semantics are critically lacking.

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

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% for 9 parameters. The description only hints at group_by and measures (via 'sum/count'), but does not explain key parameters like lazy, domain, order, or instance. This lack of detail hinders correct parameter usage.

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 description clearly states the tool aggregates Odoo records server-side using Postgres groupby/sum/count. It specifies the underlying methods (formatted_read_group for Odoo 19+, read_group for earlier versions), which distinguishes it from sibling tools like search_records or read_record that return raw records.

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 description implies the tool is for aggregation tasks, but does not explicitly state when to use it versus alternatives. It lacks guidance on prerequisites, when not to use, or comparison with siblings like aggregate_across_instances.

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

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/erpipe-org/mcp-odoo'

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