Skip to main content
Glama

ppm_role_reset_draft

Resets a role assignment to its initial draft state to allow re-editing or re-approval.

Instructions

Return a role assignment to draft.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
assignment_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'ppm_role_reset_draft' MCP tool. It is decorated with @mcp.tool(), takes an assignment_id integer, calls the Odoo server action 'action_reset_draft' on model 'ppm.role.assignment', and returns the updated state by reading the record fields.
    @mcp.tool()
    def ppm_role_reset_draft(assignment_id: int) -> dict[str, Any]:
        """Return a role assignment to draft."""
        client().call_action("ppm.role.assignment", "action_reset_draft", [assignment_id])
        return _read_state("ppm.role.assignment", assignment_id, _ROLE_FIELDS)
  • The tool is registered via the @mcp.tool() decorator from FastMCP, which exposes the function as an MCP tool named 'ppm_role_reset_draft'.
    @mcp.tool()
  • The _read_state helper reads a model record's fields after the action is performed, used by ppm_role_reset_draft to return the updated record.
    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 _ROLE_FIELDS list defines the fields returned by ppm_role_reset_draft ('name', 'state', 'role_id', 'user_id', 'project_id', 'date_from', 'date_to').
    _ROLE_FIELDS = ["name", "state", "role_id", "user_id", "project_id", "date_from", "date_to"]
Behavior2/5

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

No annotations are present, so the description must fully convey behavior. It only states the action without disclosing side effects, required state, or whether it's destructive. For a mutation tool, this is inadequate.

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

Conciseness2/5

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

The description is a single sentence, but it is under-specified rather than concise. It lacks necessary detail and does not effectively communicate the tool's purpose in a self-contained manner.

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 lack of annotations and minimal description, the tool is incomplete. It does not explain what 'draft' means, the effect on the assignment, or any return value, even though an output schema exists.

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 0% description coverage, and the description does not mention the assignment_id parameter at all. It provides no additional meaning beyond the schema's title, leaving the agent without context on how to use the parameter.

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 uses the vague verb 'return' instead of 'reset' or 'set', which could be misinterpreted as retrieving a draft. The resource 'role assignment' is clear, but the action is ambiguous. It differentiates from siblings like ppm_role_revoke by implying a status change, but not explicitly.

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 alternatives such as ppm_role_activate or ppm_role_revoke. The context of resetting to draft is implied but not explained with any prerequisites or scenarios.

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