Owlmetry
MCP

Metrics

Create, query, and manage metric definitions and aggregations via MCP tools.

Metrics track measurable operations in your app — network request duration, app launch time, checkout completion. Definitions are scoped to projects. SDKs emit metric events using lifecycle operations (start / complete / fail / cancel) or single-shot measurements (record).

list-metrics

List all metric definitions for a project.

ParameterTypeRequiredDescription
project_idUUIDYesThe project ID

get-metric

Get a metric definition by slug.

ParameterTypeRequiredDescription
project_idUUIDYesThe project ID
slugstringYesMetric slug

create-metric

Create a metric definition. Definitions are optional — metric events are ingested and queryable by slug either way — but defining a metric gives you a human-readable name and documentation in the dashboard. Requires metrics:write permission.

ParameterTypeRequiredDescription
project_idUUIDYesThe project ID
namestringYesHuman-readable metric name
slugstringYesMetric slug (lowercase letters, numbers, hyphens only)
descriptionstringNoMetric description
documentationstringNoExtended documentation
schema_definitionobjectNoSchema for metric attributes
aggregation_rulesobjectNoAggregation rules

Slugs must match the pattern [a-z0-9-]+.

update-metric

Update a metric definition. Requires metrics:write permission.

ParameterTypeRequiredDescription
project_idUUIDYesThe project ID
slugstringYesMetric slug
namestringNoNew metric name
descriptionstringNoNew description
documentationstringNoNew documentation
schema_definitionobjectNoNew schema definition
aggregation_rulesobjectNoNew aggregation rules

delete-metric

Soft-delete a metric definition. Existing metric events are not removed. Requires metrics:write permission.

ParameterTypeRequiredDescription
project_idUUIDYesThe project ID
slugstringYesMetric slug to delete

query-metric

Query aggregated metric statistics: event counts by phase, success rate, duration percentiles (avg, p50, p95, p99), error breakdown, and optional grouping.

ParameterTypeRequiredDescription
project_idUUIDYesThe project ID
slugstringYesMetric slug
sincestringNoStart time (default: 24h)
untilstringNoEnd time
app_idUUIDNoFilter by app
app_versionstringNoFilter by app version
device_modelstringNoFilter by device model
os_versionstringNoFilter by OS version
user_idstringNoFilter by user
environmentstringNoFilter by environment
group_bystringNoGroup results (see below)
data_modestringNoproduction (default), development, or all

Group-by options

ValueDescription
app_idGroup by app
app_versionGroup by app version
device_modelGroup by device model
os_versionGroup by OS version
environmentGroup by environment
time:hourGroup by hour
time:dayGroup by day
time:weekGroup by week

list-metric-events

List raw metric events for a specific metric slug. Useful for debugging individual operations — see each start, complete, fail, cancel, or record event individually.

ParameterTypeRequiredDescription
project_idUUIDYesThe project ID
slugstringYesMetric slug
phasestringNoFilter by phase: start, complete, fail, cancel, record
tracking_idUUIDNoFilter by tracking ID (correlates phases of one operation)
user_idstringNoFilter by user
environmentstringNoFilter by environment
sincestringNoStart time (default: 24h)
untilstringNoEnd time
cursorstringNoPagination cursor
limitnumberNoMax results (default 50, max 200)
data_modestringNoproduction, development, or all

Ready to get started?

Connect your agent via MCP or CLI and start tracking.