Skip to main content
Glama

MCP Odoo Shell

by seletz

execute_odoo_code

Run Python code within Odoo shell to interact with Odoo models and database. Access ORM, modules, and maintain persistent state, enabling direct database operations and model introspection.

Instructions

Execute Python code in an Odoo shell environment with full access to Odoo models and environment. This tool provides direct access to the Odoo ORM and all loaded modules through the shell environment. The ``env`` variable is available for accessing models, and all standard Odoo shell features are accessible. :param code: Python code to execute in the Odoo context :type code: str :return: The output from executing the code :rtype: str .. note:: The shell maintains persistent state between calls, so variables defined in one execution will be available in subsequent calls. .. warning:: Code executed through this tool has full access to the Odoo database and can modify data. Use with appropriate caution.

Input Schema

NameRequiredDescriptionDefault
codeYes

Input Schema (JSON Schema)

{ "properties": { "code": { "title": "Code", "type": "string" } }, "required": [ "code" ], "title": "execute_odoo_codeArguments", "type": "object" }
Install Server

Other Tools from MCP Odoo Shell

Related Tools

    MCP directory API

    We provide all the information about MCP servers via our MCP API.

    curl -X GET 'https://glama.ai/api/mcp/v1/servers/seletz/mcp-odoo-shell'

    If you have feedback or need assistance with the MCP directory API, please join our Discord server