Skip to main content
Glama
seletz

MCP Odoo Shell

by seletz

list_odoo_models

Retrieve available Odoo model names from the registry, with optional filtering by pattern to find specific models.

Instructions

List available Odoo models, optionally filtered by pattern.

Queries the Odoo registry to retrieve all available model names.
If a pattern is provided, only models containing that pattern
in their name will be returned.

:param pattern: Optional pattern to filter model names (case-sensitive)
:type pattern: str
:return: List of model names, one per line
:rtype: str

.. note::
   Results are limited to the first 50 matches to prevent overwhelming output.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
patternNo

Implementation Reference

  • The main handler function for the 'list_odoo_models' MCP tool. Decorated with @mcp.tool() for automatic registration. Generates and executes Odoo shell code to list model names matching the optional pattern, limited to 50 results.
    @mcp.tool()
    def list_odoo_models(pattern: str = "") -> str:
        """
        List available Odoo models, optionally filtered by pattern.
        
        Queries the Odoo registry to retrieve all available model names.
        If a pattern is provided, only models containing that pattern
        in their name will be returned.
        
        :param pattern: Optional pattern to filter model names (case-sensitive)
        :type pattern: str
        :return: List of model names, one per line
        :rtype: str
        
        .. note::
           Results are limited to the first 50 matches to prevent overwhelming output.
        """
        code = f"""
    models = env.registry.keys()
    if '{pattern}':
        models = [m for m in models if '{pattern}' in m]
    for model in sorted(models)[:50]:  # Limit to first 50
        print(model)
    """
        return execute_odoo_code(code)
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: the tool queries the Odoo registry, returns model names one per line, and has a 50-result limit to prevent overwhelming output. This covers important operational constraints that aren't in the schema.

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 perfectly structured and front-loaded with the core purpose, followed by implementation details, parameter documentation, and important notes. Every sentence adds value without redundancy, and the parameter documentation uses clear Python-style formatting that's easy to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a single-parameter query tool with no annotations or output schema, the description provides complete context: purpose, usage, parameter semantics, return format, and important behavioral constraints (50-result limit). Nothing essential appears to be missing for an agent to understand and use this tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description fully compensates by explaining the single parameter's purpose ('pattern to filter model names'), type (str), and behavior ('case-sensitive', 'only models containing that pattern'). The return value is also clearly documented as 'List of model names, one per line'.

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 ('List available Odoo models') and resource ('Odoo models'), distinguishing it from siblings like 'execute_odoo_code' or 'odoo_model_info' which perform different operations. The optional filtering capability is explicitly mentioned, providing a complete picture of the tool's function.

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 (to list models with optional pattern filtering) and implicitly contrasts with 'odoo_model_info' which likely provides detailed information about a specific model. However, it doesn't explicitly state when NOT to use it or name alternatives, keeping it at a 4 rather than a perfect 5.

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