Skip to main content
Glama

ppm_role_approve_and_activate

Approve and activate a role assignment in one step using its assignment ID.

Instructions

Approve and activate in one step.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
assignment_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The tool handler function for 'ppm_role_approve_and_activate'. It is decorated with @mcp.tool(), accepts an assignment_id (int), calls Odoo's 'action_approve_and_activate' on the 'ppm.role.assignment' model via the JSON-RPC client, and returns the record state.
    @mcp.tool()
    def ppm_role_approve_and_activate(assignment_id: int) -> dict[str, Any]:
        """Approve and activate in one step."""
        client().call_action(
            "ppm.role.assignment", "action_approve_and_activate", [assignment_id]
        )
        return _read_state("ppm.role.assignment", assignment_id, _ROLE_FIELDS)
  • The @mcp.tool() decorator on line 334 registers this function as an MCP tool named 'ppm_role_approve_and_activate' (derived from the function name).
    @mcp.tool()
  • The _read_state helper function used by the handler to read record fields after the action.
    def _read_state(model: str, rec_id: int, fields: list[str]) -> dict[str, Any]:
        rows = client().read(model, [rec_id], fields)
        if not rows:
            raise ValueError(f"{model} id={rec_id} not found")
        return rows[0]
  • The client() helper that provides the OdooClient instance used to call the action and read state.
    def client() -> OdooClient:
        global _client
        if _client is None:
            _client = OdooClient.from_env()
        return _client
  • The call_action method on OdooClient that invokes the button/action method on Odoo records.
    def call_action(self, model: str, method: str, ids: list[int]) -> Any:
        """Invoke an `action_*` button method on the given record ids."""
        return self.execute_kw(model, method, [ids])
Behavior2/5

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

With no annotations, the description carries the full burden of disclosing behavioral traits. It only says 'in one step,' implying atomicity, but does not mention authorization needs, side effects, or whether the operation is reversible. This is insufficient for safe invocation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise (5 words) but lacks structure and information. While it avoids verbosity, it sacrifices clarity and completeness, making it minimally adequate.

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

Completeness2/5

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

Given the presence of an output schema, the description is not required to explain return values. However, it still omits critical context about the tool's purpose and parameter, and does not compensate for the absence of annotations or schema descriptions.

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

Parameters1/5

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

The input schema has one required parameter (assignment_id) with no description coverage (0%). The description does not explain what assignment_id represents or how to obtain it, leaving the agent to infer based on the parameter title alone.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the tool approves and activates in one step, which conveys the combined action. However, it lacks specificity about what exactly is being approved/activated (likely a role assignment) and does not differentiate from separate approve and activate tools like ppm_role_activate.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus performing approval and activation separately. There is no mention of prerequisites, alternatives, or context that would help an agent decide.

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/wethti/qod-ppm-odoo-mcp'

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