# RevCent MCP Guide: `GetSiteEvents`

Brief MCP-focused guide for RevCent MCP clients and agents using the `GetSiteEvents` operation.

---

## Operation Summary

Operation:

```text
GetSiteEvents
```

Purpose:

```text
Return a paginated list of Site Events over a bounded date range.
```

Site Events are created when important actions occur for a RevCent Site, such as Site creation, deployment updates, catalog updates, routing changes, or related status activity.

---

## When to Use

Good uses:

- review recent activity for one or more Sites,
- check whether Site creation succeeded,
- inspect deployment or catalog events,
- see whether an event was tied to `main` or `dev`,
- identify a commit SHA associated with an event,
- review product counts for catalog-related events,
- build a concise Site activity timeline for the user.

Do not use `GetSiteEvents` for broad revenue analytics, runtime log review, or full historical exports.

---

## Input Schema

`GetSiteEvents` accepts required query parameters and an optional Site filter.

```json
{
  "date_start": 1710000000,
  "date_end": 1710086400,
  "limit": 25,
  "page": 1,
  "site_filter": [
    "XXXXXXXXXXXXXXXXXXXX"
  ]
}
```

### Required Fields

| Field | Type | Required | Description |
|---|---:|---:|---|
| `date_start` | `integer` | Yes | Date range start as a Unix timestamp in seconds. |
| `date_end` | `integer` | Yes | Date range end as a Unix timestamp in seconds. |
| `limit` | `integer` | Yes | Number of events to return. Must be between `1` and `25`. |
| `page` | `integer` | Yes | Page number for pagination. |

### Optional Fields

| Field | Type | Required | Description |
|---|---:|---:|---|
| `site_filter` | `array<string>` | No | One or more 20-character Site IDs to filter events by Site. |

### Important Schema Rules

- The date range cannot exceed 90 days.
- `limit` cannot exceed `25`.
- Keep pagination bounded.
- Use `site_filter` when the user asks about known Sites.

---

## Output Summary

A successful response returns pagination fields and a `results` array of Site Events.

Important Site Event fields include:

| Field | Meaning |
|---|---|
| `id` | Site Event ID. |
| `trigger` | Trigger that created the event. |
| `site` | Site associated with the event. |
| `branch` | Branch related to the event, usually `main` or `dev`, when applicable. |
| `sha` | Git commit SHA related to the event, when applicable. |
| `product_count` | Product count for catalog-related events, when applicable. |
| `status` | Event status, when returned. |
| `created_date_unix` | Event creation time. |
| `updated_date_unix` | Event update time. |

Treat event fields as operational history, not as analytics totals.

---

## Example Request for One Site

```json
{
  "date_start": 1710000000,
  "date_end": 1710086400,
  "limit": 10,
  "page": 1,
  "site_filter": [
    "XXXXXXXXXXXXXXXXXXXX"
  ]
}
```

---

## Recommended Follow-Up

When the user needs live Site state, call:

```text
GetSite
```

When the user needs runtime troubleshooting for one branch, call:

```text
GetSiteLogs
```

There is no single-event retrieval operation for Site Events. Use the returned `results` array from `GetSiteEvents` as the authoritative event output.

---

## Best Practices

1. Use narrow date ranges.
2. Use `site_filter` when possible.
3. Summarize events as a timeline.
4. Identify branch and status when returned.
5. Do not infer success or failure when the event status is missing.
6. Do not use Site Events as a reporting or analytics data source.

---

## Final MCP Instruction

Use `GetSiteEvents` to inspect bounded Site activity history, especially deployment, catalog, routing, and creation events.


---
Document Parent Directory
* [Operations](https://revcent.com/documentation/markdown/mcp/operation/index.md) - AI/MCP details and overviews for operations available within the RevCent MCP.