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)"},
            },
        },
    },

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