Skip to main content
Glama
pks0204

Odoo Developer Assistant MCP

by pks0204

analyze_odoo_python_model

Detect structural errors, missing attributes, decorator misconfigurations, and common mistakes in Odoo Python model files using AST analysis.

Instructions

Analyze an Odoo Python model file for structural errors, missing attributes, decorator misconfigurations, and common mistakes using AST.

Args: python_path: Absolute or relative path to the Python file. addon_path: Optional path to the containing addon directory to enforce sandboxed file access.

Input Schema

NameRequiredDescriptionDefault
addon_pathNo
python_pathYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations, the description carries the full burden; 'using AST' plus 'sandboxed file access' implies a non-mutating static read, and the addon_path wording discloses the sandbox constraint, which is genuinely useful. It still omits what the result looks like (findings list, severity, line numbers), whether the file is ever modified, and what happens when the path is outside the sandbox or does not exist.

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?

The behavioral summary is front-loaded in a single dense sentence, followed by a conventional Args block. The Args entries largely restate the schema but do add the absolute/relative and sandbox semantics, so the length is close to justified.

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?

No output schema exists and no annotations are present, so the description should describe the shape of the analysis result and any failure modes; neither is covered. It is adequate for knowing when to call the tool and how to fill both parameters, but incomplete about what comes back.

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 description coverage is 0%, so the Args block does the work: python_path is documented as absolute-or-relative, and addon_path is given a real purpose (containing addon directory that enforces sandboxed access) rather than a bare type. Minor gap: it doesn't say what happens if addon_path and python_path disagree.

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?

The description gives a specific verb ('Analyze') and a precisely scoped resource ('an Odoo Python model file'), then enumerates the defect classes it detects (structural errors, missing attributes, decorator misconfigurations) and the technique (AST). This clearly separates it from siblings such as analyze_odoo_xml_view, validate_odoo_manifest, and inspect_odoo_module without needing to name them.

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?

The use case is implied by the enumerated error classes, so an agent can infer it should reach for this when statically checking a Python model file. However, there is no explicit when-to-use statement, no exclusion, and no reference to the sibling tools (e.g., inspect_odoo_module or analyze_odoo_error) that an agent might confuse it with.

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