create_experiment
Create Experiment
Create a new A/B test experiment. Experiments run on top of feature flags. The feature flag must be implemented in your code first.
create_experiment
Create a new A/B test experiment. Experiments run on top of feature flags. The feature flag must be implemented in your code first.
list_session_recordings
List session recording metadata. Supports filtering by person, date range, and pagination. Note: This returns metadata only, not the raw replay data. Use the PostHog UI to view full replays.
list_insights
List analytics insights (trends, funnels, retention, paths, stickiness, lifecycle). Supports searching by name and filtering to saved insights only.
list_property_definitions
List all property definitions in the project. Property definitions describe the possible properties that can be attached to events or persons. Use this to discover available properties for filtering, grouping, and analysis.
list_cohorts
List all cohorts in the project. Cohorts are groups of users that match specific criteria. Static cohorts are manually managed lists, while dynamic cohorts are automatically updated every 24 hours.
capture_event
Send one or more events to PostHog. Supports single event capture or batch capture of multiple events. Use this to track pageviews, custom events, screen views, identify users (`$identify`), create aliases (`$create_alias`), or send any custom event. Person properties can be set or updated via the `set` and `setOnce` fields.
get_feature_flag
Retrieve detailed information about a specific feature flag by its ID.
get_experiment
Retrieve detailed information about a specific A/B test experiment including its configuration, metrics, and results.
delete_feature_flag
Permanently delete a feature flag. This cannot be undone.
delete_survey
Permanently delete a survey.
get_insight
Retrieve detailed information and results for a specific insight by its ID.
create_dashboard
Create a new dashboard for organizing insights and analytics visualizations.
list_projects
List projects accessible with the current credentials. Provide organizationId to use PostHog's current organization-scoped project endpoint.
list_event_definitions
List all event definitions in the project. Event definitions describe the possible event names that have been captured. Use this to discover which events are available for querying, filtering, and analysis.
list_persons
Search and list person profiles in PostHog. Supports filtering by search query and person properties. Returns paginated results with person details including distinct IDs and properties.
delete_annotation
Delete an annotation from charts/dashboards.
create_cohort
Create a new cohort. Static cohorts are manually managed user lists; dynamic cohorts automatically include users matching specified criteria.
update_dashboard
Update an existing dashboard's name, description, pinned status, or tags.
update_experiment
Update an existing A/B test experiment's name, description, dates, or configuration. Only provided fields will be updated.
delete_dashboard
Permanently delete a dashboard.
get_dashboard
Retrieve detailed information about a specific dashboard by its ID, including its tiles and configuration.
update_survey
Update an existing survey's name, description, questions, targeting, or dates. Only provided fields will be updated.
list_feature_flags
List all feature flags in the project. Supports searching by flag key or name. Returns flag configuration including key, active status, rollout percentage, and targeting rules.
get_session_recording
Retrieve metadata about a specific session recording by its ID. Returns timing, activity metrics, and user information. Does not include the raw replay JSON.
create_survey
Create a new survey with questions and optional targeting. Surveys can be of various types (e.g. popover) and can be linked to feature flags.
list_annotations
List annotations on charts/dashboards. Annotations mark significant events or deployments with text notes at specific dates.
create_annotation
Create a new annotation to mark a significant event or deployment on PostHog charts and dashboards.
evaluate_feature_flags
Evaluate all feature flags for a specific user (distinct ID). Returns the computed flag values based on the user's properties and targeting rules. Optionally pass person properties and group properties inline for server-side evaluation without requiring prior identification.
update_feature_flag
Update an existing feature flag's name, active status, rollout percentage, or targeting configuration. Only provided fields will be updated.
get_person
Retrieve detailed information about a specific person by their PostHog person ID. Returns the person's distinct IDs, all properties, and creation timestamp.
get_survey
Retrieve detailed information about a specific survey by its ID, including questions, targeting, and status.
create_feature_flag
Create a new feature flag. Supports boolean flags, multivariate flags (for A/B test variants), and remote config flags. Provide the key, name, and optionally configure rollout percentage and targeting filters.
list_experiments
List A/B test experiments in the project. Returns experiment metadata, status, and associated feature flag keys.
get_cohort
Retrieve detailed information about a specific cohort by its ID.
list_surveys
List all surveys in the project with their configuration, questions, and status.
list_dashboards
List all dashboards in the project. Supports searching by name.
run_query
Execute an ad-hoc HogQL query against your PostHog data. HogQL is PostHog's SQL-like query language that supports querying events, persons, sessions, and more. Use this for custom analytics queries, aggregations, and data exploration that go beyond predefined insights.
delete_person
Permanently delete a person profile from PostHog. This removes the person and all their associated data. To create or update persons, use the Capture Event tool with `$identify` event and `set`/`setOnce` properties instead.
get_annotation
Retrieve a specific PostHog annotation by ID.
update_group_property
Set or update properties for a PostHog group.
create_action
Create a PostHog action from event, selector, URL, or property matching steps.
create_group
Create or update a PostHog group for a configured group type.
delete_cohort
Permanently delete a cohort from PostHog.
delete_action
Delete a PostHog action.
get_action
Retrieve a specific PostHog action by ID, including its step rules.
list_actions
List PostHog actions. Actions group one or more event patterns into reusable analytics definitions.
list_group_types
List configured PostHog group types. Use the returned groupTypeIndex with group list/find/update tools.
update_annotation
Update an annotation's content, date marker, or scope.
list_groups
List groups for a specific PostHog group type. Uses PostHog's forward-only cursor pagination.
update_cohort
Update an existing cohort's name, description, static state, or filter groups.
get_current_user
Retrieve the current PostHog user, current organization, and current team/project context.
delete_experiment
Permanently delete an experiment from PostHog.
delete_group_property
Delete one or more properties from a PostHog group.
update_action
Update a PostHog action's metadata, tags, deletion state, or step rules.
list_organizations
List PostHog organizations accessible with the current credentials. Use an organization ID with List Projects for the current documented project API.
find_group
Find a specific PostHog group by group type index and group key.
Capture and analyze product usage events, manage feature flags, run A/B test experiments, and create user surveys. Track persons and groups, evaluate feature flags for specific users, query analytics data using HogQL, and manage cohorts. Retrieve session recording metadata, create and manage insights and dashboards (trends, funnels, retention, paths). Manage projects, organizations, annotations, actions, and event/property definitions.
Common questions about connecting Posthog to AI agents with Metorial.