Skip to main content
Glama

ppm_status_report_reset_draft

Revert a published status report to draft state. Undo a publish action to allow editing or corrections.

Instructions

Revert a published status report back to draft.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
report_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the ppm_status_report_reset_draft tool. It calls Odoo's 'action_reset_draft' on the 'ppm.status.report' model and returns the updated state.
    @mcp.tool()
    def ppm_status_report_reset_draft(report_id: int) -> dict[str, Any]:
        """Revert a published status report back to draft."""
        client().call_action("ppm.status.report", "action_reset_draft", [report_id])
        return _read_state("ppm.status.report", report_id, ["name", "state", "project_id"])
  • The tool is registered via the @mcp.tool() decorator on line 130 (the decorator applies to the function defined on line 138). This registers it as an MCP tool named 'ppm_status_report_reset_draft'.
    @mcp.tool()
    def ppm_status_report_reset_draft(report_id: int) -> dict[str, Any]:
  • The _read_state helper function used by the handler to read and return the status report's state after resetting to draft.
    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 call_action method on OdooClient that actually invokes the Odoo server-side method (action_reset_draft) via JSON-RPC.
    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?

No annotations are present, so the description must carry the full burden. It merely states the action without disclosing any behavioral traits like side effects, permissions required, or whether the revert is reversible. This is minimal for a mutation tool.

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 a single, concise sentence of 7 words that effectively communicates the core action with no wasted words.

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 only one parameter and an output schema, the description lacks context about the consequences of reverting (e.g., data loss, impact on related items) and does not explain the return value or state after the action.

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

Parameters2/5

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

With 0% schema description coverage, the description does not add meaning to the single parameter 'report_id'. The schema says it's an integer, but no context on where to find it or what valid values are.

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 'Revert a published status report back to draft.' It uses a specific verb ('revert') and resource ('published status report'), and distinguishes from sibling tools like ppm_status_report_publish by indicating an opposite action.

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

Usage Guidelines3/5

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

The description implies use when a published status report needs to be returned to draft, but it does not provide explicit guidance on when to use this tool versus alternatives, such as other status report tools or what prerequisites might be 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