Skip to main content
Glama

ppm_role_activate

Activate a draft role assignment to synchronize security groups and apply the role to users.

Instructions

Activate a draft role assignment (syncs the security group).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
assignment_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler function for the ppm_role_activate tool. Calls the 'action_activate' method on 'ppm.role.assignment' via Odoo RPC and returns the updated state fields.
    @mcp.tool()
    def ppm_role_activate(assignment_id: int) -> dict[str, Any]:
        """Activate a draft role assignment (syncs the security group)."""
        client().call_action("ppm.role.assignment", "action_activate", [assignment_id])
        return _read_state("ppm.role.assignment", assignment_id, _ROLE_FIELDS)
  • Registration via @mcp.tool() decorator on the FastMCP instance 'mcp'. The function is both the registration point and the handler.
    @mcp.tool()
    def ppm_role_activate(assignment_id: int) -> dict[str, Any]:
        """Activate a draft role assignment (syncs the security group)."""
        client().call_action("ppm.role.assignment", "action_activate", [assignment_id])
        return _read_state("ppm.role.assignment", assignment_id, _ROLE_FIELDS)
  • Helper function _read_state used by ppm_role_activate to read back the role assignment record after activation.
    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]
  • Field list for role assignment read operations, used by ppm_role_activate.
    _ROLE_FIELDS = ["name", "state", "role_id", "user_id", "project_id", "date_from", "date_to"]
  • OdooClient.call_action helper that invokes the Odoo server-side method via execute_kw. Used by ppm_role_activate to call 'action_activate' on 'ppm.role.assignment'.
    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])
Behavior3/5

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

The description mentions 'syncs the security group', providing a behavioral side effect. However, with no annotations at all, it does not disclose idempotency, reversibility, permission requirements, or output details.

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?

Single sentence, no wasted words. Efficiently communicates the core purpose.

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?

Minimal context provided. Lacks parameter detail, side-effect depth, and output description. For a tool with no annotations and low schema coverage, more information is necessary to ensure correct invocation.

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?

Schema description coverage is 0% and the description adds no information about the sole parameter 'assignment_id'. The description does not explain what the assignment_id represents or how to obtain it.

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 action ('Activate') and the resource ('draft role assignment'), with a parenthetical that explains the effect ('syncs the security group'). This distinguishes it from siblings like ppm_role_approve_and_activate and ppm_role_reset_draft.

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 explicit guidance on when to use vs. alternatives. Does not mention prerequisites (e.g., need for approval) or when not to use. Given many sibling tools, more comparative context is needed.

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