[
  {
    "name": "sendgrid_get_stats",
    "description": "Fetch email sending statistics (delivered, opens, clicks, bounces, etc.) for a date range. Example: get_stats({ start_date: \"2024-01-01\", end_date: \"2024-01-31\", _apiKey: \"SG.xxx\" })",
    "inputSchema": {
      "type": "object",
      "properties": {
        "start_date": {
          "type": "string",
          "description": "Start date in YYYY-MM-DD format, e.g. \"2024-01-01\""
        },
        "end_date": {
          "type": "string",
          "description": "Optional end date in YYYY-MM-DD format. Defaults to today."
        },
        "_apiKey": {
          "type": "string",
          "description": "SendGrid API key (SG.xxx)"
        }
      },
      "required": [
        "start_date",
        "_apiKey"
      ]
    }
  },
  {
    "name": "get_blocks",
    "description": "List email addresses that have been blocked by SendGrid. These are emails that were rejected due to receiving server issues. Example: get_blocks({ limit: 50, _apiKey: \"SG.xxx\" })",
    "inputSchema": {
      "type": "object",
      "properties": {
        "limit": {
          "type": "number",
          "description": "Max results to return (default 100, max 500)"
        },
        "_apiKey": {
          "type": "string",
          "description": "SendGrid API key (SG.xxx)"
        }
      },
      "required": [
        "_apiKey"
      ]
    }
  },
  {
    "name": "get_bounces",
    "description": "List email addresses that have bounced. Includes bounce reason and timestamp. Example: get_bounces({ limit: 100, _apiKey: \"SG.xxx\" })",
    "inputSchema": {
      "type": "object",
      "properties": {
        "limit": {
          "type": "number",
          "description": "Max results to return (default 100, max 500)"
        },
        "_apiKey": {
          "type": "string",
          "description": "SendGrid API key (SG.xxx)"
        }
      },
      "required": [
        "_apiKey"
      ]
    }
  }
]
