| search_records | Search for records in an Odoo model.
Args:
model: The Odoo model name (e.g., 'res.partner', 'sale.order')
domain: Search filter as Odoo domain list (e.g., [['is_company', '=', True]])
Common operators: =, !=, >, <, >=, <=, like, ilike, in, not in
fields: List of fields to return (empty = smart defaults)
limit: Maximum records to return (default 80)
offset: Number of records to skip (for pagination)
order: Sort order (e.g., 'name asc, id desc')
Returns:
JSON list of matching records
Examples:
- Find all companies: model='res.partner', domain=[['is_company', '=', True]]
- Find orders from this month: model='sale.order', domain=[['date_order', '>=', '2024-01-01']]
- Find unpaid invoices: model='account.move', domain=[['payment_state', '!=', 'paid']]
|
| get_record | Get a specific record by ID.
Args:
model: The Odoo model name
record_id: The ID of the record to retrieve
fields: List of fields to return (empty = all accessible fields)
Returns:
JSON object with the record data
Example:
Get customer details: model='res.partner', record_id=5
|
| count_records | Count records matching a domain.
Args:
model: The Odoo model name
domain: Search filter as Odoo domain list
Returns:
Number of matching records
Example:
Count unpaid invoices: model='account.move', domain=[['payment_state', '!=', 'paid']]
|
| list_models | List all Odoo models available for MCP access.
Returns:
List of models with their permissions (read, create, update, delete)
|
| get_model_fields | Get field definitions for an Odoo model.
Args:
model: The Odoo model name
field_types: Optional list of types to filter (e.g., ['many2one', 'char'])
Returns:
List of fields with their types and descriptions
|
| create_record | Create a new record in Odoo.
Args:
model: The Odoo model name
values: Dictionary of field values for the new record
Returns:
Success message with the new record ID
Example:
Create customer: model='res.partner', values={'name': 'New Customer', 'email': 'new@example.com'}
|
| update_record | Update an existing record in Odoo.
Args:
model: The Odoo model name
record_id: The ID of the record to update
values: Dictionary of field values to update
Returns:
Success message
Example:
Update customer phone: model='res.partner', record_id=5, values={'phone': '123-456-7890'}
|
| delete_record | Delete a record from Odoo.
Args:
model: The Odoo model name
record_id: The ID of the record to delete
Returns:
Success message
⚠️ WARNING: This action is irreversible!
|
| execute_method | Execute a custom method on an Odoo model.
Args:
model: The Odoo model name
method: The method name to call
record_ids: Optional list of record IDs to call the method on
args: Positional arguments for the method
kwargs: Keyword arguments for the method
Returns:
Method result
⚠️ Note: This requires special permission in Odoo settings.
Example:
Confirm sale order: model='sale.order', method='action_confirm', record_ids=[5]
|
| get_record_name | Get the display name of a record (useful for looking up references).
Args:
model: The Odoo model name
record_id: The record ID
Returns:
Display name of the record
|
| search_and_read_one | Search and return the first matching record (convenience method).
Args:
model: The Odoo model name
domain: Search filter as Odoo domain list
fields: List of fields to return
Returns:
The first matching record or a message if not found
|