Skip to main content
Glama
jstibal

Openterms-mcp

list_receipts

Retrieve recent workspace receipts to track cryptographic consent proofs, filter by action type, and monitor spending caps with verifiable records.

Instructions

List recent receipts for this workspace.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMax receipts to return (default 10, max 50)
action_typeNoFilter by action type

Implementation Reference

  • The handler implementation for the list_receipts tool, which makes a GET request to the /v1/receipts API endpoint and formats the results.
    elif name == "list_receipts":
        params = {}
        if arguments.get("limit"):
            params["limit"] = min(arguments["limit"], 50)
        if arguments.get("action_type"):
            params["action_type"] = arguments["action_type"]
        resp = client.get("/v1/receipts", params=params, headers=_headers())
        if resp.status_code == 200:
            data = resp.json()
            receipts = data.get("receipts", data) if isinstance(data, dict) else data
            if not receipts:
                return "No receipts found."
            lines = [f"Found {len(receipts)} receipt(s):"]
            for r in receipts[:10]:
                lines.append(
                    f"  [{r.get('action_type')}] {r.get('receipt_id', '?')[:12]}... "
                    f"— {r.get('terms_url', '?')} ({r.get('created_at', '?')})"
                )
            if len(receipts) > 10:
                lines.append(f"  ... and {len(receipts) - 10} more")
            return "\n".join(lines)
        return _format_error(resp)
  • The schema definition for the list_receipts tool, defining the accepted input parameters.
        "name": "list_receipts",
        "description": "List recent receipts for this workspace.",
        "inputSchema": {
            "type": "object",
            "properties": {
                "limit": {"type": "integer", "description": "Max receipts to return (default 10, max 50)"},
                "action_type": {"type": "string", "description": "Filter by action 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