Skip to main content
Glama
Odoo MCP Server

Odoo MCP Server

by ajmalj

Count Records

count_records

Counts Odoo records in a specified model that match an optional domain filter, helping you verify totals or filtered results without retrieving full records.

Instructions

Count records in an Odoo model matching a domain filter.

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>"
    },
    "name": "count_records"
  }
}

Input Schema

NameRequiredDescriptionDefault
modelYesThe technical name of the model (e.g., 'res.partner')
domainNoOptional domain filter (e.g., [['is_company', '=', True]])

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.4/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden, and it discloses almost nothing: it does not state that the operation is read-only, whether it requires access rights on the model, whether an empty domain counts all records, or how large counts are reported. The presence of an output schema relieves it of describing return values, but read-only safety and access behavior remain undocumented.

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?

A single front-loaded sentence with no filler; the verb, resource, and filter condition all appear in the first clause. Nothing could be trimmed without losing meaning.

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 simple two-parameter tool with full schema coverage and an output schema, the definition supplies enough to call it correctly. The remaining gap is guidance on when to count versus search, which is a usage concern rather than a structural omission.

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 100% and both parameters carry inline descriptions with examples ('res.partner', [['is_company', '=', True]]), so the description adds nothing beyond the schema. It reinforces the roles of model and domain but provides no syntax or edge-case detail such as how a null domain is interpreted.

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?

The description gives a specific verb and resource ('Count records in an Odoo model') plus a scoping qualifier ('matching a domain filter'), so an agent can distinguish it from a fetch-style sibling by the word 'count' alone. It does not explicitly name search_records or state that it returns only a total instead of records, so sibling differentiation is implicit 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 Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied: the tool counts rather than returns records, which suggests using it when only a total is needed, but the description never says when to prefer it over search_records or what happens when the domain is omitted. No exclusions or prerequisites are given.

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