Skip to main content
Glama

ppm_risk_close

Close a risk by setting its date_closed to finalize risk management in Odoo PPM. Use this action to update the risk status and trigger state transitions.

Instructions

Close a risk; sets date_closed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
risk_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the ppm_risk_close tool. Calls action_close on the ppm.risk model via the Odoo client and returns the updated risk state.
    @mcp.tool()
    def ppm_risk_close(risk_id: int) -> dict[str, Any]:
        """Close a risk; sets date_closed."""
        client().call_action("ppm.risk", "action_close", [risk_id])
        return _read_state("ppm.risk", risk_id, _RISK_FIELDS)
  • The @mcp.tool() decorator registers ppm_risk_close as a FastMCP tool.
    @mcp.tool()
  • Schema fields returned when reading the risk state after closing.
    _RISK_FIELDS = [
        "name",
        "state",
        "risk_type",
        "probability",
        "impact",
        "risk_score",
        "risk_level",
        "project_id",
        "owner_id",
    ]
  • Helper function that reads and returns the current state of a record after the action is performed.
    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]
  • Lazy-initialized singleton factory for the OdooClient used to communicate with the Odoo backend.
    def client() -> OdooClient:
        global _client
        if _client is None:
            _client = OdooClient.from_env()
        return _client
Behavior2/5

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

With no annotations, the description carries full responsibility for behavioral disclosure. It only mentions 'sets date_closed' but omits critical details: whether the risk status changes, if the operation is irreversible, required permissions, or idempotency. This is insufficient 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.

Conciseness3/5

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

The description is extremely short (8 words), which is concise but lacks structure. It is front-loaded with the action, but the brevity comes at the expense of completeness; a slightly longer but still concise description would be more effective.

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

Completeness3/5

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

Given that an output schema exists, the description does not need to explain return values. However, it still lacks context about risk state prerequisites, error conditions, and side effects beyond date_closed. It is minimally adequate but leaves significant gaps.

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%, so the description should compensate but does not. The lone parameter risk_id is not explained beyond its name; there is no mention of acceptable values, format, or constraints (e.g., must reference an existing risk). This adds no semantic value.

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

Purpose4/5

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

The description clearly states the verb 'Close' and the resource 'risk', and mentions the side effect of setting date_closed. It is distinct from sibling tools like ppm_risk_reopen or ppm_risk_mark_occurred, though it does not explicitly differentiate itself.

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 (e.g., reopen, mark_occurred). It does not specify prerequisites such as whether the risk must be in an 'open' state, nor does it advise against closing in certain contexts.

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