Developer Tools

Axiom MCP

Query logs, traces and metrics, and manage datasets, dashboards, monitors and notifiers through Axiom's hosted MCP server.

Tools

This is a reference catalogue. Tools cannot be configured or run from this page.

  • Create dashboard

    Create a new dashboard from a JSON document. Include name, owner, charts, layout, refreshTime, schemaVersion (2), timeWindowStart, and timeWindowEnd. Add sections with a top-level sections array in display order. Give each section a unique UUID id, a non-empty title, and optional defaultCollapsed. Assign a chart to a section with chart.sectionId set to that section id. Omit sectionId for ungrouped charts. Keep SmartFilter charts ungrouped. owner controls visibility: X-AXIOM-EVERYONE for a shared dashboard visible to all organization members, or me for a private dashboard owned by the current user (the server substitutes the user id). Org API tokens have no user and cannot own a private dashboard; use X-AXIOM-EVERYONE for those. A TimeSeries chart can hold several query rows. query is the first row: set mpl for a metrics query or apl for an events query, and do not put MPL under apl. For more than one row, set queries to every row including the first (at least two). Each row may have a name. Set a row's queryOptions.useSecondaryYAxis to true or "true" to plot it on the right Y axis. The result ends with an Open in Axiom link for this resource. Give that link to the user.

  • Create dataset

    Create a new dataset in the current organization (POST /v2/datasets). Use this when the user asks to create a dataset or when a needed dataset does not exist yet. Does not create API tokens. Kinds (optional `kind`, defaults to axiom:events:v1) — same two options as the Axiom Console: - axiom:events:v1 (Events) — logs or traces; getDatasetFields() for fields, queryDataset() for APL queries. - otel:metrics:v1 (Metrics) — OTel metrics; getDatasetFields({ datasetName, includeMetadata: true }) for dataset metadata, listMetrics() and queryMetrics() for metrics. Optional `retentionDays`: custom retention period in days. Omit to use the organization default. Subject to plan limits. Dataset names must be 1-80 characters, start and end with a letter or number, and may contain letters, numbers, underscores, dots, and hyphens. Ingest requires a separate ingest token. Use prepareApiToken() to prepare its Console creation form. The result ends with an Open in Axiom link for this resource. Give that link to the user.

  • Create monitor

    Create a monitor. Axiom runs it on a schedule and, when it alerts, notifies through its notifiers (email, Slack, webhooks, and others). Choose the type by what should alert. Threshold: an aggregated value crosses a fixed number. Good for error counts, latency percentiles, and queue depth. MatchEvent: every event that matches a filter. Good for events that each need attention, such as a failed deploy, a panic, or a change to a production secret. NewValues: a column holds a value it has not held recently. Good for first appearances. Without an aggregation, any first sighting: a new error message, host, or AWS API call. With an aggregation, a new value that passes a bar: a new API client that sends at least 200 requests in an hour. AnomalyDetection: a time series moves away from its own recent behavior. Good for values with no obvious fixed limit, such as traffic or ingest volume that suddenly drops or spikes. monitorJson lists the fields of each type. Use listNotifiers() to find notifier IDs. The result ends with an Open in Axiom link for this resource. Give that link to the user.

  • Create notifier

    Create an email notifier, or start manual setup for another channel. Email: this call creates and saves the notifier using name and properties.email.emails; unsupported fields are rejected. Other channels, including Slack and coding agents: this call only opens or links to the Axiom notifiers page. The user must configure and save the notifier there; this call does not create it. Explain that manual setup is required before calling the tool. Wait for the user to confirm they saved it and provide its name, then use listNotifiers() to verify it and obtain its id for a monitor's notifierIds. Do not request credentials in chat or include them in notifierJson. The result ends with an Open in Axiom link for this resource. Give that link to the user.

  • Query dataset

    When the user pastes an Axiom query URL containing qid, pass that qid as queryId and omit apl. The result is the stored APL or MPL and its time range. Run the returned APL with queryDataset, or the returned MPL with queryMetrics. When the user asks to see, return, save, or share the results, or for a link or the query that was used, set saveResults: true on every queryDataset call whose result you will hand back. Give them the Open in Axiom link from that result. Leave saveResults unset for probes and ordinary investigation. That link contains initForm, re-runs the query, and is not a saved result. # Instructions 1. Query Axiom datasets using Axiom Processing Language (APL). The query must be a valid APL query string. For comparative investigations, use dimensionalAnalysis() to discover distinguishing dimensions or investigate a shortlist; it handles field eligibility and query batching. Use queryDataset() to verify leads with focused counts and rates, or to write a custom comparison. **Only use this for `events`, `otel.traces`, and similar datasets. Do NOT use for `otel-metrics-v1` datasets — use `queryMetrics()` instead.** 2. ALWAYS understand schema before substantive queries—do not guess column names or types. Prefer `getDatasetFields()` or APL `| where _time > ago(5m) | getschema` on a narrow window (use dataset names from `listDatasets`); use `take 1` or project specific columns for sample values. Before you `where` or `summarize` by a field, estimate cardinality on recent data: `| where _time > ago(5m) | summarize count() by <field> | top 10 by count_`. Avoid `project *` or projecting all fields on very wide datasets unless deliberately mapping shape (see item 5). Skipping probes causes wrong field names, bad types, and expensive re-runs. 3. A query returns at most 50,000 rows. 4. Prefer aggregations over non aggregating queries when possible to reduce the amount of data returned. 5. Be selective in what you project in each query (unless otherwise needed, like for discovering the schema). It's expensive to project all fields. 6. ALWAYS restrict `startTime`/`endTime` to the narrowest window that answers the question—every query scans data and consumes resources. Prefer the smallest APL per step; widen time or complexity only after probing (item 2). 7. When filtering for a specific term or value, put it on the right field—use `has`/`has_cs`/`contains` there after item 2. See **Avoid `search`** under Query performance rules. 8. **`map[string]` columns (e.g. `attributes`, `attributes.custom`, `resource` in OTel-style data)** — `getDatasetFields` and in-query `getschema` show the type but **not** the keys inside the map. You must **sample** (`take`, `project` the map column, or `mv-expand` + `summarize` to list keys) to learn the structure, then use bracket access (e.g. `['attributes']['http.method']`, `['attributes.custom']['http.response.status_code']`). Do not assume key names across services or SDK versions. 9. Query cost limits may apply to your credentials. When configured, each result ends with a budget footer (query cost and remaining hourly/daily budget, in GB-hours — GBhr, the unit limits are enforced in) — heed its warnings. Exceeding a limit rejects further queries until the window resets (fixed UTC hour/day boundaries); the error says when. 10. Use searchAxiomDocs() or readAxiomDoc() to verify unfamiliar APL operators, functions, or product behavior before querying. ### Query performance rules 1. **Narrow `startTime`/`endTime`** — Keep the API window as tight as your question allows. A fixed `bin(_time, X)` widens the window to whole bins, even with an explicit `_time` filter. Check each table's effective range before interpreting totals. Use `bin_auto(_time)` to keep the requested window. 2. **`_time` first in APL** — When you filter on `_time` in the query text, put `where _time between (...)` before other filters. This keeps extra in-query narrowing fast. 3. **Most selective `where` first** — Axiom does not reorder predicates; put the filter that removes the most rows earliest. 4. **`project` early and narrowly** — Avoid pulling all columns from very wide datasets (expensive payloads; risk of failures on huge rows). 5. **Prefer fast string ops** — Use `_cs` (case-sensitive) variants when possible; prefer `startswith`/`endswith` over `contains` when applicable; `matches regex` only as a last resort. 6. **Use `has`/`has_cs` for unique-looking strings** — IDs, UUIDs, trace IDs, and error codes. `has` leverages full-text indexes when available and is much faster than `contains` for high-entropy terms. Use `contains` only when you need true substring matching (e.g., partial paths). 7. **Duration literals** — e.g. `duration > 10s`, not manual conversion. 8. **Avoid search** — scans ALL fields. Use `has`/`has_cs`/`contains` on specific fields. 9. **Avoid heavy `parse_json()` in hot paths** — Filter/narrow first when possible. 10. **Avoid pack(*)** — creates dict of ALL fields per row. Use pack with named fields only. 11. Limit results—use take 10 or top 20 instead of default 1000 when exploring. 12. **Field quoting**—quote identifiers with dots/dashes/spaces: ['geo.country']. For map field keys, use index notation: ['attributes.custom']['http.protocol']. 13. **Narrow a `contains` match.** After a `contains` filter matches, read the matched values. Then filter on the exact value with `==` or `has_cs` instead of adding more `contains` filters. ### Joins Each side of a join runs as a separate query and has a row limit. Follow these rules: - Use only `kind=inner` (the default), `innerunique`, or `leftouter`. Other kinds, such as `leftanti`, `leftsemi`, and `fullouter`, fail. - Filter and aggregate each side before the join. Put the smaller side on the left. - Project only the fields that you need on each side. Fewer fields raise the row limit. - Look for a warning that a side "was truncated by a row limit". The join result can then miss matches. - To find values that first appear in a time window, use `summarize first_seen = min(_time) by <field> | where first_seen > ago(1h)` instead of an anti-join. ### APL is not KQL APL differs from KQL in these ways: - Use `countof(search, text)`, `extract_all(regex, captureGroups, text)`, and `replace_regex(regex, rewrite, text)`. The KQL argument order or count fails. - APL has no window functions. `prev`, `next`, and `row_cumsum` fail. - Aggregation functions work only in `summarize`. To compare each bin with the average, get the average in a first query. - After `extend props = parse_json(...)`, use `props.level` or `props['level']`. `['props.level']` looks for a stored field with that name. # Examples Basic: - Filter: ['logs'] | where ['severity'] == "error" or ['duration'] > 500ms - Time range: ['logs'] | where ['_time'] > ago(2h) and ['_time'] < now() - Project rename: ['logs'] | project-rename responseTime=['duration'], path=['url'] Aggregations: - Count by: ['logs'] | summarize count() by bin(['_time'], 5m), ['status'] - Multiple aggs: ['logs'] | summarize count(), avg(['duration']), max(['duration']), p95=percentile(['duration'], 95) by ['endpoint'] - Compare populations: use dimensionalAnalysis() for discovery and focused comparisons; for custom APL, ['logs'] | summarize spotlight(['isError'], ['endpoint']) - Histograms: ['logs'] | summarize histogram(['responseTime'], 100) by ['endpoint'] - Distinct: ['logs'] | summarize dcount(['userId']) by bin_auto(['_time']) Text matching & Parse: - Match on known fields (avoid full-row `search`): ['logs'] | where ['message'] has_cs "error" or ['message'] has_cs "exception" - Parse logs: ['logs'] | parse-kv ['message'] as (duration:long, error:string) with (pair_delimiter=",") - Regex extract: ['logs'] | extend errorCode = extract("error code ([0-9]+)", 1, ['message']) - Contains ops: ['logs'] | where ['message'] contains_cs "ERROR" or ['message'] startswith "FATAL" Data Shaping: - Extend & Calculate: ['logs'] | extend duration_s = ['duration']/1000, success = ['status'] < 400 - Dynamic: ['logs'] | extend props = parse_json(['properties']) | where props.level == "error" - Pack/Unpack: ['logs'] | extend fields = pack("status", ['status'], "duration", ['duration']) - Arrays: ['logs'] | where ['url'] in ("login", "logout", "home") | where array_length(['tags']) > 0 Advanced: - Union: union ['logs-app*'] | where ['severity'] == "error" - Case: ['logs'] | extend level = case(['status'] >= 500, "error", ['status'] >= 400, "warn", "info") Time Operations: - Relative range: ['logs'] | where ['_time'] between (ago(1h) .. now()) - Absolute range: ['logs'] | where ['_time'] between (datetime(2026-01-15T10:00:00Z) .. datetime(2026-01-15T11:00:00Z)) - Multiple time bins: ['logs'] | summarize count() by bin(['_time'], 1h), bin(['_time'], 1d) - Time shifts: ['logs'] | extend prev_hour = ['_time'] - 1h String Operations: - String funcs: ['logs'] | extend domain = tolower(extract("://([^/]+)", 1, ['url'])) - Concat: ['logs'] | extend full_msg = strcat(['level'], ": ", ['message']) - Replace: ['logs'] | extend clean_msg = replace_string(['message'], "FATAL", "ERROR") Common Patterns: - Error analysis: ['logs'] | where ['severity'] == "error" | summarize error_count=count() by ['error_code'], ['service'] - Status codes: ['logs'] | summarize requests=count() by ['status'], bin_auto(['_time']) | where ['status'] >= 500 - Latency tracking: ['logs'] | summarize p50=percentile(['duration'], 50), p90=percentile(['duration'], 90) by ['endpoint'] - User activity: ['logs'] | summarize user_actions=count() by ['userId'], ['action'], bin(['_time'], 1h)

  • Query metrics

    When the user asks to see, return, save, or share the results, or for a link or the query that was used, set saveResults: true on every queryMetrics call whose result you will hand back. Give them the Open in Axiom link from that result. Leave saveResults unset for probes and ordinary investigation. That link contains initForm, re-runs the query, and is not a saved result. # Instructions 1. Query OpenTelemetry metrics in a metrics dataset (kind "otel-metrics-v1") using MPL (Metrics Processing Language). NOT APL. 2. NEVER guess metric names or tag values. Discover them with listMetrics(), then listMetricTags() and getMetricTagValues() with metricName. 3. ALWAYS use the smallest time range that meets your needs. 4. Query cost limits may apply. When configured, each result ends with a budget footer (query cost and remaining hourly/daily budget in GB-hours, GBhr) — heed its warnings. Exceeding a limit rejects queries until the fixed UTC hour/day window resets; the error says when. 5. Before writing unfamiliar MPL or after a syntax error, call getMetricsSpec({ datasetName }) for the full syntax, functions, and examples. Use searchAxiomDocs() or readAxiomDoc() for metric semantics or product behavior. 6. Results start with query metadata as compact JSON. Heed backend warnings and preserve group_keys order when interpreting groups. custom_unit overrides unit; when ignore_unit is true, only custom_unit applies, if supplied. Do not infer a unit when none applies or rescale values to fit a unit label. # MPL Skeleton Chain only the stages you need with `|`; `where` (not `filter`) must precede transformations: ``` `dataset`:`metric` | offset -1w // directly after the source: values from 1w earlier (+1w = later; opposite sign to PromQL) | where <tag> <op> <value> // == != < > <= >= in contains and or not; "str", 42, true, #/regex/, [array] | where <tag> is <type> // type check: string, int, float, bool, array | align to 5m using avg // over time: avg sum min max count last prom::rate; omit `to 5m` for one value over the whole range | group by <tag>, <tag> using sum // across series; omit `by` to merge all | map rate // per point: rate increase + - * / fill::prev fill::const(0) | bucket by <tag> to 5m using interpolate_delta_histogram(0.5, 0.99) // omit `to 5m` for the whole range ``` Regex literals start with `#`: `| where path == #/^\/api\/.*/`. Tag values are typed: `code == 200` does not match the string "200". Combine queries: `(q1, q2) | compute <name> using /` (+ - * / min max avg). Backtick-escape names with special characters: where `service.name` == "frontend". # Query Planning With Metric Definitions Choose a strategy from the `type` and `temporality` returned by listMetrics(). This is guidance, not strict rules; prioritize the user's intent. - `Gauge`: use current values or a fitting aggregation; apply a rate only if the user asks how the gauge changed. - `CounterNonMonotonic`: clarify whether the user wants the current value or the change over time before choosing a rate or delta. - `CounterMonotonic` + `cumulative`: a cumulative counter; for change over time, `rate`, `prom::rate`, or `increase` usually beat raw values. - `CounterMonotonic` + `delta`: samples are per-collection-interval increments, not instantaneous values. - `Histogram`: use bucket functions for count, average, sum, and percentiles: `interpolate_delta_histogram(...)` for delta, `interpolate_cumulative_histogram(...)` for cumulative temporality. - `Summary`: do not treat it like histogram buckets. - Missing or ambiguous `type`/`temporality`: write the most conservative query and state your assumptions. # Parameters and Chart Resolution Bind declared MPL parameters by bare name (no `$` or `param__` prefix) with MPL literal values: `params: { svc: '"frontend"', window: '5m' }`. Optional `chartWidth` and `pixelPerPoint` guide automatic `$__interval` resolution; fixed intervals such as `5m` are unchanged. # Full Results Set truncate: false for the complete metrics-v2 JSON (every series, sample, summary, tag, and metadata field) in structuredContent and text. Use structuredContent when saving results for charts or programs; the text can include a budget footer. # Examples Rate, grouped: `my-metrics`:`http.requests.total` | align to 5m using prom::rate | group by method, path, code using sum Histogram percentiles: `my-metrics`:`http.request.duration.seconds.bucket` | bucket by method, path to 5m using interpolate_delta_histogram(0.90, 0.99) Error rate (compute): ( `my-metrics`:`http.requests.total` | where code >= 400 | group by method, path using sum, `my-metrics`:`http.requests.total` | group by method, path using sum ) | compute error_rate using / | align to 5m using avg

  • Send feedback

    Share feedback about your experience with the Axiom MCP server. Use this when: - A tool description was misleading, unclear, or led you to call the wrong tool - A tool result or error message was confusing, unhelpful, or hard to parse - A capability you needed was missing - Something worked particularly well and should not change Describe the tool behavior in general terms, for example "the startTime default on queryDataset was unclear". Feedback is stored and reviewed by the Axiom team.