Skip to main content
Glama
seletz

MCP Odoo Shell

by seletz

reset_odoo_shell

Restart the Odoo shell session to clear session state and recover from errors by terminating the current process.

Instructions

Reset the Odoo shell session (restart the shell process).

Terminates the current shell process and clears the global shell manager,
which will cause a new shell to be started on the next code execution.
This is useful for clearing session state or recovering from errors.

:return: Success message or error description
:rtype: str

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The reset_odoo_shell MCP tool handler: resets the Odoo shell session by terminating the current process and clearing the global shell manager via reset_shell_manager.
    @mcp.tool() 
    def reset_odoo_shell() -> str:
        """
        Reset the Odoo shell session (restart the shell process).
        
        Terminates the current shell process and clears the global shell manager,
        which will cause a new shell to be started on the next code execution.
        This is useful for clearing session state or recovering from errors.
        
        :return: Success message or error description
        :rtype: str
        """
        from .server import reset_shell_manager
        
        try:
            result = reset_shell_manager()
            return result
        except Exception as e:
            return f"Error resetting shell: {str(e)}"
  • Helper function that implements the core logic to stop the shell process and reset the global shell_manager instance.
    def reset_shell_manager() -> str:
        """
        Reset the shell manager (restart the shell process).
        
        Terminates the current shell process and clears the global shell manager,
        which will cause a new shell to be started on the next access.
        
        :return: Success message or error description
        :rtype: str
        """
        global shell_manager
        try:
            if shell_manager:
                shell_manager.stop()
            shell_manager = None
            return "Odoo shell session reset successfully"
        except Exception as e:
            return f"Error resetting shell: {str(e)}"
  • Import of the reset_odoo_shell tool function, which triggers auto-registration via @mcp.tool() decorator when the module is imported.
    from .tools import execute_odoo_code, reset_odoo_shell, list_odoo_models, odoo_model_info
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key behavioral traits: it terminates the current process, clears the manager, and causes a new shell on next execution, which are crucial for understanding its impact. It also mentions the return type (str) and possible outcomes (success or error), adding valuable context beyond basic functionality.

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?

The description is appropriately sized and front-loaded, starting with the core action and following with explanatory details. Every sentence earns its place by clarifying the process, purpose, and return value without unnecessary words, making it efficient and well-structured.

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?

Given the tool's complexity (a reset operation with no parameters) and the absence of annotations and output schema, the description is largely complete. It covers what the tool does, why to use it, and the return type. However, it could be more explicit about potential side effects or dependencies, such as whether it affects other sessions or requires specific permissions, slightly limiting completeness.

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?

The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description does not discuss parameters, which is appropriate. A baseline of 4 is applied as it compensates adequately for the lack of parameters by focusing on the tool's action and effects, adding value without redundancy.

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 clearly states the specific action ('reset', 'restart', 'terminates', 'clears') and resource ('Odoo shell session', 'shell process', 'global shell manager'), distinguishing it from sibling tools like execute_odoo_code, list_odoo_models, and odoo_model_info. It precisely defines what the tool does without being vague or tautological.

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 provides clear context for when to use this tool ('useful for clearing session state or recovering from errors'), which implies usage scenarios. However, it does not explicitly state when not to use it or name alternatives among the sibling tools, such as whether execute_odoo_code might be preferred for certain tasks, keeping it from a perfect score.

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

Install Server

Other Tools

Latest Blog Posts

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