Skip to main content
Glama
seletz
by seletz

reset_odoo_shell

Reset the Odoo shell session to clear session state or recover from errors. This tool terminates the current shell process, enabling a fresh session upon next code execution.

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 MCP tool handler function for 'reset_odoo_shell'. It is decorated with @mcp.tool() for automatic registration and simply delegates to the reset_shell_manager() helper, returning its result or an error message.
    @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)}"
  • Supporting utility function that performs the actual shell reset: terminates the current OdooShellManager process via stop() and clears 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 statement in __init__.py that loads the tool functions, triggering their definition and @mcp.tool() registration during module import.
    from .tools import execute_odoo_code, reset_odoo_shell, list_odoo_models, odoo_model_info

Other Tools

Related 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