Skip to main content
Glama

ppm_risk_move_in_matrix

Update a risk's probability and impact in the P×I matrix to reposition it, with risk score and level recalculated automatically.

Instructions

Move a risk in the P×I matrix.

Both probability and impact are integers 1–5 (matching the selection keys). The server recomputes risk_score and risk_level automatically.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
risk_idYes
probabilityYes
impactYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The @mcp.tool() decorated function ppm_risk_move_in_matrix that implements the tool logic. It validates probability/impact in [1,5], calls Odoo execute_kw to write the risk's probability and impact fields, then reads back the updated state.
    @mcp.tool()
    def ppm_risk_move_in_matrix(risk_id: int, probability: int, impact: int) -> dict[str, Any]:
        """Move a risk in the P×I matrix.
    
        Both probability and impact are integers 1–5 (matching the selection keys).
        The server recomputes `risk_score` and `risk_level` automatically.
        """
        if not (1 <= probability <= 5) or not (1 <= impact <= 5):
            raise ValueError("probability and impact must be integers in [1, 5]")
        client().execute_kw(
            "ppm.risk",
            "write",
            [[risk_id], {"probability": str(probability), "impact": str(impact)}],
        )
        return _read_state("ppm.risk", risk_id, _RISK_FIELDS)
  • _RISK_FIELDS is the schema of fields returned by each risk tool, including ppm_risk_move_in_matrix. It defines what fields are read back after updating the risk.
    _RISK_FIELDS = [
        "name",
        "state",
        "risk_type",
        "probability",
        "impact",
        "risk_score",
        "risk_level",
        "project_id",
        "owner_id",
    ]
  • The @mcp.tool() decorator registers ppm_risk_move_in_matrix as an MCP tool on the FastMCP instance (line 19: mcp = FastMCP('qod-ppm')).
    @mcp.tool()
    def ppm_risk_move_in_matrix(risk_id: int, probability: int, impact: int) -> dict[str, Any]:
  • Helper function _read_state used to read back risk state after updating. Calls client().read() to fetch field values for a given 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]
Behavior3/5

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

Without annotations, the description discloses automatic recomputation of risk_score and risk_level, adding value. However, it omits potential side effects (e.g., permission requirements, whether the move triggers notifications) and does not clarify if the operation is destructive or reversible.

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?

Two concise sentences, front-loaded with the action. No wasted words. Efficiently conveys essential information.

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

Completeness4/5

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

Given the simple operation with three parameters and an existing output schema, the description covers the core functionality and constraints. It could mention that the risk must exist, but that is implied.

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

Parameters4/5

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

The description adds meaning by specifying that probability and impact are integers from 1-5 matching selection keys, which the schema (0% coverage) does not convey. Risk_id is left implicit but is self-explanatory.

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 tool moves a risk in the P×I matrix, with explicit constraints (probability and impact are integers 1-5). It distinguishes itself from sibling tools like ppm_risk_close or ppm_risk_reopen by focusing on matrix repositioning.

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 usage when updating risk ratings, but lacks explicit guidance on when to use this tool versus alternatives (e.g., risk analysis phase). No context on prerequisites or exclusions.

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