{
  "tools": [
    {
      "name": "check_mandate",
      "description": "Check whether a purchase falls within the permission an owner has given their agent.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "mandate_id": {
            "type": "string",
            "description": "The mandate (permission slip) the agent presented with its order."
          },
          "merchant": {
            "type": "string",
            "description": "The shop's registered identifier."
          },
          "amount": {
            "type": "object",
            "description": "The value and currency of the purchase."
          },
          "category": {
            "type": "string",
            "description": "What is being bought, such as groceries or travel."
          }
        },
        "required": [
          "mandate_id",
          "merchant",
          "amount"
        ]
      },
      "request": {
        "jsonrpc": "2.0",
        "id": 1,
        "method": "tools/call",
        "params": {
          "name": "check_mandate",
          "arguments": {
            "mandate_id": "mdt_31c9",
            "merchant": "merchant_freshbasket_ie",
            "amount": {
              "value": 86.4,
              "currency": "EUR"
            },
            "category": "groceries"
          }
        }
      },
      "response": {
        "jsonrpc": "2.0",
        "id": 1,
        "result": {
          "structuredContent": {
            "allowed": true,
            "owner": "verified person",
            "remaining_limit": {
              "value": 113.6,
              "currency": "EUR"
            },
            "allowed_categories": [
              "groceries",
              "household"
            ],
            "expires_at": "2026-10-31T23:59:00Z"
          },
          "isError": false
        }
      }
    }
  ]
}
