> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.ada.cx/llms.txt.

# get_change_history

Reads the change history of an AI Agent from the [Audit log](/docs/other/audit-log). Each row is one configuration change: what changed, when, who changed it, and through which interface. Rows come newest first.

Use it to find what changed on the Agent and who changed it. Use it also to match a configuration change to a change in a metric.

Read-only.

## Example prompts

* "What changed on the AI Agent last week, and who changed it?"
* "Show every change to the Refund flow Playbook this month."
* "Did anything change on the Agent the day before the CSAT dropped?"
* "List the changes that [ana@example.com](mailto:ana@example.com) made in the last 30 days."

## Parameters

All parameters are optional. Filters combine with AND.

| Parameter     | Type    | Description                                                                                                                                                |
| ------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `start_date`  | string  | Start of the window, ISO 8601. Defaults to 7 days before `end_date`.                                                                                       |
| `end_date`    | string  | End of the window, ISO 8601. Defaults to now.                                                                                                              |
| `entity_type` | array   | Returns only these entity types. See [Entity types](#entity-types).                                                                                        |
| `activity`    | array   | Returns only these activities: `activated`, `created`, `deactivated`, `deleted`, `executed`, `invited`, `promoted`, `reverted`, or `updated`.              |
| `entity_id`   | string  | Returns only the history of the entity with this ID. For an MCP tool, use the ID of its MCP server. See [History of an MCP tool](#history-of-an-mcp-tool). |
| `actor_email` | string  | Returns only the changes made by the person with this email.                                                                                               |
| `limit`       | integer | The rows on one page, from 1 to 200. Defaults to 50.                                                                                                       |
| `cursor`      | string  | The `next_cursor` value from the previous page.                                                                                                            |

A date without a time zone is read as UTC.

## Date window

With no dates, the window is the last 7 days. The maximum window is 30 days. A longer window returns an error. For a longer period, make one call for each window of 30 days or less.

## Entity types

`entity_type` accepts these values:

`agent_health_email`, `agent_health_rule`, `api_key`, `audience`, `changeset`, `channel`, `coaching`, `collaboration`, `config_import`, `conversation_trigger`, `custom_instruction`, `custom_metric`, `glossary_term`, `greeting`, `handoff`, `intent`, `knowledge_article`, `knowledge_source`, `mcp_access_policy`, `mcp_server`, `persona`, `playbook`, `proactive_conversation`, `process`, `saved_view`, `setting`, `simulation`, `team_member`, `test_case`, `tool`, `topic`, `variable`, `verification_policy`.

`tool` covers API tools, code tools, and MCP tools.

The tool returns no Sign-in entries. Read them on the [Audit log](/docs/other/audit-log) page.

## Response

| Field                    | Description                                                                           |
| ------------------------ | ------------------------------------------------------------------------------------- |
| `start_date`, `end_date` | The window that was read.                                                             |
| `returned_count`         | The number of rows on this page.                                                      |
| `next_cursor`            | The cursor for the next page, or `null` on the last page.                             |
| `events`                 | The rows, newest first.                                                               |
| `before_and_after`       | How to get the before and after values. Present only when a row has a `changeset_id`. |

Each row has these fields:

| Field                       | Description                                                                                  |
| --------------------------- | -------------------------------------------------------------------------------------------- |
| `timestamp`                 | When the change happened.                                                                    |
| `actor_name`, `actor_email` | Who made the change.                                                                         |
| `interface`                 | Where the change came from.                                                                  |
| `activity`                  | What was done.                                                                               |
| `entity_type`               | The type of the entity that changed.                                                         |
| `entity_name`               | The name of the entity.                                                                      |
| `entity_id`                 | The ID of the entity.                                                                        |
| `changeset_id`              | The change set the change went through. Present only for a change made through a change set. |
| `details`                   | An extra line of text. Present on some rows only.                                            |

## Before and after values

The Audit log does not store before and after values.

For a row with a `changeset_id`, call [`list_agent_changesets`](/mcp/tools/list-agent-changesets) with that `changeset_id` and `include_diff` set to `true`. It returns the before and after value of each field.

A change made directly, for example in the dashboard, has no `changeset_id` and no before and after values.

A row for a reverted or deleted change set also has no `changeset_id`. Its `entity_id` is the change set that was reverted or deleted.

* **Reverted:** call [`list_agent_changesets`](/mcp/tools/list-agent-changesets) with that `entity_id` as `changeset_id` and `include_diff` set to `true`. It returns the change that the revert undid.
* **Deleted:** a deleted change set cannot be read.

## History of an MCP tool

The Audit log stores the changes of an MCP tool under the ID of its MCP server. To read the history of an MCP tool, set `entity_type` to `tool` and `entity_id` to the ID of its MCP server. The `entity_name` of each row is the name of the MCP server, then the name of the tool, for example `Search - remote_search`.

A call with the ID of the MCP tool itself returns an error. The error gives the ID of the MCP server to use.

## Paging through results

If `next_cursor` is not `null`, call again with the same parameters and `cursor` set to `next_cursor`. Keep the same filters and dates on every page. A cursor with changed filters or dates returns an error. To start a new query, leave out `cursor`.

## Errors

* **The Audit log is off for the AI Agent.** The tool returns an error, because no history is recorded. This error does not mean that nothing changed. Contact your Ada team to turn on the Audit log.
* **The Audit log is off for API connections.** A connection with an API key also needs Audit log access for API connections. Without it, the tool returns an error. Connect with [OAuth](/mcp/introduction/authentication#oauth), or contact your Ada team to turn it on.