Skip to main content
Glama
odoo-safe-mcp
by makelele29

odoo_execute_kw

Destructive

Execute Odoo ORM methods through a safety firewall: reads run immediately, draft creations follow a guarded policy, and critical writes or confirmations require signed human approval before execution.

Instructions

Safely execute any Odoo ORM method (execute_kw) through the firewall.

Reads run immediately. Draft creations (sale.order, purchase.order, crm.lead) run under the guarded-draft policy. Critical operations (write, unlink, confirm, post...) wait for a human approval on Slack/Teams and are executed here only after a signed decision.

Args: model: Odoo technical model name (e.g. 'sale.order', 'res.partner', 'account.move'). method: ORM method name (e.g. 'search_read', 'create', 'write', 'action_confirm'). args: Positional arguments (domains, record ids, value dictionaries). kwargs: Keyword arguments (e.g. {'fields': ['name'], 'limit': 10}). justification: One honest sentence on why (shown to the approver, marked as unverified).

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

Input Schema

NameRequiredDescriptionDefault
argsNo
modelYes
kwargsNo
methodYes
justificationNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv3.0.0
    • addedInput schema / properties / justification
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Justification"
      +}
  2. First observedv2.0.0

TDQS

A4.3/5.0
Behavior5/5

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

Beyond the destructiveHint/readOnlyHint=false annotations, the description discloses the firewall tiers, that critical ops wait for a signed human decision on Slack/Teams, and that justification is shown to the approver marked unverified. This is exactly the extra behavioral context annotations can't convey.

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 the one-line purpose and the policy tiers, then a tight Args block. Every sentence adds operational information; nothing is padding.

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?

An output schema exists so return values needn't be explained, and the approval flow is described. Minor gaps remain: whether a call can return an approval-pending state, how long approval takes, or what happens on denial is not stated.

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 0%, so the description carries the burden, and it documents all five parameters with concrete examples ('sale.order', 'search_read', domains/record ids, {'fields': ['name'], 'limit': 10}). It stops short of explaining the args-as-string alternative form allowed by the anyOf schema.

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+resource ('execute any Odoo ORM method (execute_kw)') and frames it as the generic escape hatch through a firewall. It's distinguishable from the read-oriented siblings like odoo_search/odoo_read, though it never names them explicitly, so the boundary is inferred rather than spelled out.

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

Usage Guidelines4/5

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

The description gives clear operating context: reads run immediately, draft creations go through the guarded-draft policy, and critical operations block on human approval. This tells an agent what to expect when calling it, but it doesn't say 'prefer odoo_search/odoo_read/odoo_count for plain reads instead of this tool', leaving the sibling routing implicit.

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