Skip to main content
Glama
odoo-mcp-server

odoo-mcp-server

Search records

odoo_search
Read-onlyIdempotent

Search model records using Odoo domain filters and return a paginated page with requested fields, total matches, offset, and has_more for paging.

Instructions

Find the records of one model that match a domain and return one page of them with the requested fields, plus total (all matches), offset and has_more; page with offset while has_more is true. Use it when you need the records themselves. For known ids use odoo_read, for a number only odoo_count, for totals per group odoo_aggregate. You only see records your access rights allow. Many2one values come as {id, name}, one2many and many2many as {count, ids} (first 50 ids), long texts are cut at 4,000 characters.

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": "odoo_search"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoRecords per page. Values above the model's max_records_per_call (usually 200) are reduced to it.
modelYesTechnical model name from odoo_list_models, e.g. 'res.partner' or 'sale.order'.
orderNoSort order on fields of this model, e.g. 'date_order desc, id desc'. Default: the model's own order.
domainNoOdoo domain: a list of [field, operator, value] conditions, combined with AND unless prefixed by '|' (OR) or '!' (NOT). A dotted path follows a relation to another available model, e.g. 'country_id.code'. Omit or [] to match every record you can see; archived records are left out unless the domain has a condition on active. Example: [["customer_rank", ">", 0], ["country_id.code", "=", "BE"]].
fieldsNoField names to return, from odoo_describe_model. Omit for a default selection.
offsetNoNumber of matching records to skip, for paging.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv1.1.1
    • changedInput schema / properties / domain / description
      Previous value: -"Odoo domain, e.g. [[\"customer_rank\", \">\", 0], [\"country_id.code\", \"=\", \"BE\"]]."New value: +"Odoo domain: a list of [field, operator, value] conditions, combined with AND unless prefixed by '|' (OR) or '!' (NOT). A dotted path follows a relation to another available model, e.g. 'country_id.code'. Omit or [] to match every record you can see; archived records are left out unless the domain has a condition on active. Example: [[\"customer_rank\", \">\", 0], [\"country_id.code\", \"=\", \"BE\"]]."
    • changedInput schema / properties / fields / description
      Previous value: -"Field names to return. Leave empty for a sensible default set."New value: +"Field names to return, from odoo_describe_model. Omit for a default selection."
    • addedInput schema / properties / limit / description
      Added value: +"Records per page. Values above the model's max_records_per_call (usually 200) are reduced to it."
    • changedInput schema / properties / model / description
      Previous value: -"Technical model name, e.g. 'res.partner'."New value: +"Technical model name from odoo_list_models, e.g. 'res.partner' or 'sale.order'."
    • addedInput schema / properties / offset / description
      Added value: +"Number of matching records to skip, for paging."
    • changedInput schema / properties / order / description
      Previous value: -"Sort order, e.g. 'date_order desc, id desc'."New value: +"Sort order on fields of this model, e.g. 'date_order desc, id desc'. Default: the model's own order."
  2. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/5

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

Beyond the readOnly/idempotent annotations, it discloses that results are filtered by the caller's access rights, and describes how values are serialized: many2one as {id, name}, one2many/many2many as {count, ids} truncated to 50 ids, long texts cut at 4,000 characters. Archived records being excluded unless domain touches 'active' is behavior an agent cannot infer from the schema.

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?

Front-loaded with what the tool returns and when to use it, then routing, then return-shape caveats. Every sentence carries distinct information; there is no restatement of the name or title.

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

Completeness5/5

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

No output schema exists, yet the description fully explains the return envelope and the serialization of relation fields, which is the main thing an agent could get wrong. Combined with 100% schema coverage and read-only annotations, nothing material is missing.

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 100%, so the baseline is 3; the description still adds meaning by tying offset/limit into a paging contract and warning that limit values are reduced to the model's max_records_per_call. Domain and field-selection semantics are largely already in the schema, so it stops short of a 5.

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 (find/return) plus the resource (records of one model matching a domain), and defines the return envelope (page of records, total, offset, has_more). It also distinguishes itself from odoo_read, odoo_count and odoo_aggregate, so an agent can pick it without opening sibling schemas.

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

Usage Guidelines5/5

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

Gives an explicit selection rule ("Use it when you need the records themselves") and names the alternatives with the condition that selects each: known ids -> odoo_read, a number only -> odoo_count, per-group totals -> odoo_aggregate. It also states a paging loop (offset while has_more is true).

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