Skip to main content
Glama
jstibal

Openterms-mcp

provider_activity

Monitor and analyze API usage by viewing receipt activity, statistics, and unique agents for your terms URL to track consent verification.

Instructions

View receipt activity against your terms URL (requires provider API key via OPENTERMS_PROVIDER_KEY). Shows stats, unique agents, and recent receipts for your API.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMax receipts to return (default 10)

Implementation Reference

  • The implementation of the `provider_activity` tool, which fetches provider statistics from the OpenTerms API.
    elif name == "provider_activity":
        if not PROVIDER_KEY:
            return "❌ OPENTERMS_PROVIDER_KEY not set. Register as a provider first."
        # Get stats
        resp = client.get("/v1/provider/stats", headers=_provider_headers())
        if resp.status_code != 200:
            return _format_error(resp)
        stats = resp.json()
        lines = [
            f"📊 Provider Activity",
            f"  Provider: {stats.get('provider_id', 'n/a')}",
            f"  Verified: {'✅' if stats.get('verified') else '❌'}",
            f"  Receipts (total): {stats.get('receipts_total', 0)}",
            f"  Receipts (24h): {stats.get('receipts_24h', 0)}",
            f"  Receipts (7d): {stats.get('receipts_7d', 0)}",
            f"  Receipts (30d): {stats.get('receipts_30d', 0)}",
            f"  Unique agents: {stats.get('unique_agents', 0)}",
        ]
        breakdown = stats.get('action_type_breakdown', {})
        if breakdown:
            lines.append("  Action types:")
            for atype, count in breakdown.items():
                lines.append(f"    {atype}: {count}")
        return "\n".join(lines)
  • Definition of the `provider_activity` tool's input schema and description.
    {
        "name": "provider_activity",
        "description": (
            "View receipt activity against your terms URL (requires provider API key via OPENTERMS_PROVIDER_KEY). "
            "Shows stats, unique agents, and recent receipts for your API."
        ),
        "inputSchema": {
            "type": "object",
            "properties": {
                "limit": {"type": "integer", "description": "Max receipts to return (default 10)"},
            },
        },
    },
Behavior3/5

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

No annotations provided, so description carries full burden. Successfully discloses authentication mechanism and return data categories (stats, agents, receipts), but omits safety classification (read-only status), pagination behavior, or error conditions.

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 efficient sentences with zero waste. Front-loaded with core action and auth requirement; second sentence specifies return value categories. No redundancy despite missing annotations.

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?

Adequate for a single-parameter tool without output schema. Compensates for missing return schema by describing output structure (stats, agents, receipts) and covers critical provider-specific authentication context.

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?

Input schema has 100% description coverage ('Max receipts to return'), so baseline is appropriately met. Description focuses on tool purpose rather than parameter details, adding no redundant parameter semantics.

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?

Description provides specific verb ('View') and resource ('receipt activity'), scoped to 'your terms URL' and 'your API'. Distinguishes from sibling list_receipts by emphasizing analytics outputs ('stats, unique agents') rather than simple enumeration.

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?

Identifies critical authentication prerequisite ('requires provider API key via OPENTERMS_PROVIDER_KEY') but lacks explicit guidance on when to use this analytics tool versus list_receipts or other receipt-related siblings.

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