Skip to main content
Glama
jstibal

Openterms-mcp

policy_decisions

Audit and understand recent policy evaluation decisions (allow/deny/escalate) for workspace oversight and compliance verification.

Instructions

View recent policy evaluation decisions (allow/deny/escalate) for this workspace. Useful for auditing and understanding what the policy engine has been doing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMax decisions to return (default 10)
decisionNoFilter by decision type

Implementation Reference

  • The handler implementation for the 'policy_decisions' tool, which fetches recent policy decisions from the /v1/policy/decisions endpoint.
    elif name == "policy_decisions":
        params = {"limit": min(arguments.get("limit", 10), 50)}
        if arguments.get("decision"):
            params["decision"] = arguments["decision"]
        resp = client.get("/v1/policy/decisions", params=params, headers=_headers())
        if resp.status_code == 200:
            data = resp.json()
            decisions = data.get("decisions", [])
            if not decisions:
                return "No policy decisions recorded yet."
            lines = [f"Recent policy decisions ({len(decisions)}):"]
            for d in decisions:
                icon = {"allow": "βœ…", "deny": "🚫", "escalate": "⏸️"}.get(d.get("decision"), "❓")
                reasons = d.get("reasons", [])
                reason_str = f" β€” {reasons[0]}" if reasons else ""
                lines.append(
                    f"  {icon} {d.get('decision', '?').upper()} v{d.get('profile_version', '?')} "
                    f"receipt={d.get('receipt_id', 'n/a')[:12]}...{reason_str} ({d.get('evaluated_at', '?')})"
                )
            return "\n".join(lines)
        return _format_error(resp)
  • The MCP tool schema definition for 'policy_decisions', including the input schema for limit and decision filter.
        "name": "policy_decisions",
        "description": (
            "View recent policy evaluation decisions (allow/deny/escalate) for this workspace. "
            "Useful for auditing and understanding what the policy engine has been doing."
        ),
        "inputSchema": {
            "type": "object",
            "properties": {
                "limit": {"type": "integer", "description": "Max decisions to return (default 10)"},
                "decision": {"type": "string", "enum": ["allow", "deny", "escalate"], "description": "Filter by decision type"},
            },
        },
    },

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/jstibal/openterms-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server