Skip to main content
Glama
Odoo Connect MCP

Odoo Connect MCP

by Tristan439

Count records

count_records
Read-onlyIdempotent

Count Odoo records that match a domain filter to verify totals and check query results. Specify a model and optional domain; an empty domain counts all records.

Instructions

Counts records matching a domain.

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
modelYesTechnical model name, e.g. "sale.order", "res.partner", "crm.lead"
domainNoOdoo domain, e.g. [["state","=","sale"],["amount_total",">",1000]]. Empty = all records.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.9/5.0
Behavior2/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so safety and side-effect behavior are fully covered structurally. The description adds nothing further: no statement about what is returned (a number), performance on large domains, or whether the domain default of [] counting everything is intentional. It restates a read operation without adding behavioral context.

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?

A single front-loaded sentence with zero filler. It is efficient, though the terseness is part of why usage and return-value context are absent, leaving it just short of ideal for a tool this easy to over- or under-use.

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?

The tool is simple (2 parameters, no output schema, rich annotations), so little is strictly required. However, with no output schema the description should say that the result is an integer count, which is the one thing an agent cannot derive from structured fields.

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%, with the model parameter giving concrete examples ("sale.order", "res.partner") and domain explaining the Odoo syntax and that empty means all records. The description only echoes "domain" without adding syntax or semantics, so the schema does the heavy lifting and the baseline 3 applies.

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 ("Counts records") and the scoping condition ("matching a domain"). It is clearly distinct from read/search tools, but it never names or contrasts with the close sibling aggregate_records, so the agent must infer the boundary.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

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

There is no explicit when-to-use guidance, no exclusions, and no mention of alternatives such as aggregate_records or search_records. The agent can only infer that counting is appropriate when a cardinality is wanted rather than the records themselves.

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