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"},
            },
        },
    },
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It adds valuable behavioral context by specifying 'recent' (temporal scope) and 'this workspace' (data isolation), and implies read-only access via the verb 'View'. However, it fails to define the time window for 'recent', disclose permission requirements, or explain pagination behavior beyond the limit parameter.

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 consists of two efficient, front-loaded sentences. The first establishes the core action and resource; the second clarifies the use case. No words are wasted, and every clause earns its place by conveying scope or purpose.

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 the tool's simplicity (2 optional parameters, no nested objects) and lack of annotations, the description adequately covers the basic functionality. However, it leaves gaps regarding the definition of 'recent', safety guarantees (read-only status), and output structure that would be necessary for a complete operational picture.

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

Parameters3/5

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

With 100% schema description coverage, the baseline is appropriately met. The description echoes the enum values (allow/deny/escalate) which reinforces the filter parameter's purpose, but does not add significant semantic depth beyond what the schema already provides regarding the 'limit' parameter's relationship to the 'recent' timeframe.

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 tool 'View[s] recent policy evaluation decisions' with specific outcomes (allow/deny/escalate) for the workspace. It effectively distinguishes from sibling 'get_policy' (likely rules configuration) and 'simulate_policy' (likely testing) by emphasizing historical 'decisions' and 'auditing'.

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 provides implied usage context ('Useful for auditing and understanding what the policy engine has been doing'), which suggests when to use it. However, it lacks explicit guidance on when NOT to use it or alternatives (e.g., distinguishing from simulate_policy for hypothetical testing).

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

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