> This page is for Agent Handler.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.merge.dev/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.merge.dev/_mcp/server.

# Amplitude

**Authentication:** API key and secret key. See [Magic Link](/merge-agent-handler/features/magic-link) for the runtime auth flow.

## Sample use cases

* What's the 7-day retention curve for users who hit the onboarding `signup_complete` event last week?
* Top 10 events by volume yesterday, broken down by user cohort.
* Find users who triggered `payment_failed` more than twice in the last 24 hours.

## Available Tools

#### get\_active\_users

Get active, new, returning, or exiting user counts over a date range. Dates must be in YYYYMMDD format. Supports dail...

#### get\_average\_session\_length

Get average session length per day over a date range. Dates must be in YYYYMMDD format.

#### get\_retention

Get user retention analysis for a starting and returning event over a date range. Pass event objects like "event\_type...

#### get\_funnel

Get funnel conversion analysis for a sequence of events over a date range. Pass a list of event objects like \["event\_...

#### get\_realtime\_active\_users

Get realtime active user counts with 5-minute granularity over the last 2 days. No date parameters needed.

#### get\_revenue\_ltv

Get lifetime value and revenue metrics for new users over a date range. Metrics include revenue, ARPU, ARPPU, and pay...

#### get\_user\_composition

Get user distribution across values of a specific property (e.g. country, platform, os) over a date range. Dates in Y...

#### list\_annotations

List all chart annotations in the project. Returns annotation IDs, dates, labels, details, and category IDs.

#### get\_annotation

Get a single annotation by ID. Use list\_annotations to find valid IDs.

#### create\_annotation

Create a chart annotation with a label and start timestamp (ISO 8601). Optionally assign a category name. Use list\_an...

#### update\_annotation

Update an existing annotation's label, start/end timestamps, details, or category. Use list\_annotations to find valid...

#### delete\_annotation

Delete an annotation by ID. Use list\_annotations to find valid IDs.

#### list\_annotation\_categories

List all annotation categories. Returns category IDs, names, and colors.

#### create\_annotation\_category

Create a new annotation category with a name and optional color.

#### delete\_annotation\_category

Delete an annotation category by ID. Use list\_annotation\_categories to find valid IDs.

#### get\_chart\_results

Get the results of a saved chart by its ID. Find chart IDs from the URL in Amplitude (e.g. the ID in [https://app.ampl](https://app.ampl)...

#### list\_cohorts

List all behavioral cohorts in the project. Returns cohort IDs, names, owners, size, and metadata. Use this to find c...

#### request\_cohort\_export

Request an async export of a cohort's user data. Returns a request\_id to poll status with. Use list\_cohorts to find v...

#### update\_cohort\_membership

Add or remove user IDs from a cohort. Each membership item needs 'ids' (list of user IDs) and 'operation' ('ADD' or '...

#### list\_events

List all event types in the project with their weekly totals and percentage of DAU. Returns event names, totals, and ...

#### get\_event\_segmentation

Get event segmentation data: counts, uniques, averages, or DAU percentage for a specific event over a date range. Sup...

#### list\_event\_types

List all event types in the project taxonomy with their display names, descriptions, categories, and visibility setti...

#### get\_event\_type

Get details for a specific event type by name, including its properties, description, and category. Use list\_event\_ty...

#### list\_event\_properties

List all properties for a specific event type. Returns property names, display names, types, and descriptions. Use li...

#### list\_user\_properties

List all user properties in the project taxonomy. Returns property names, display names, types, and descriptions.

#### search\_users

Search for users by user ID or device ID. Returns matching users with their Amplitude ID, last seen time, country, pl...

#### get\_user\_activity

Get a user's recent events and summary data by their Amplitude ID (numeric). Use search\_users first to find the Ampli...

#### get\_user\_profile

Get a user's profile including properties, cohort memberships, and recommendations from the Profile API. Provide eith...