Skip to main content
Preview Agents use your metrics through MCP Gateway: they search a workspace for a metric, then read the version you released. This guide shows the calls an agent makes, how to pin an agent to one release, and how the /atlan-analytics skills build an analytics agent on top of your metrics.

Before you begin

  • Metrics app: An administrator has installed the Metrics app. The metric tools appear in MCP Gateway only after that. See Install and manage apps.
  • MCP client: Your agent’s client is connected to MCP Gateway. See Connect client to MCP Gateway.
  • Access: The identity the agent signs in with can read the workspace. Every call runs with that identity’s permissions.
  • A released metric: At least one metric shows Live in Studio. See Release metrics.

How an agent reads a metric

Every call after mcp__initialise also takes session_id and a short rationale, which MCP Gateway records for audit.
1

Check the metric tools are available

Ask your client for its tool list (tools/list). It should include:If the two extension__metric__ tools are missing, the Metrics app isn’t installed for your organization.
2

Search for a metric

The agent calls extension__metric__search_metrics with a workspace_id and either query (ranked search) or name (exact identifier):
Request
Each result carries what an agent needs to choose a metric, without the SQL:
Response (one item)
Search returns the newest revision of each metric, which may not be the released one. Use it to choose a metric, then read the release.
3

Read the released version

The agent calls registry__get_artifact with the metric’s id and channel set to latest:
Request
The result is the full released definition under metadata.definition, plus a release record with its release_id, channel, version_label, and release_status. This is the same version Studio shows as Live.If nothing is released on that channel, the call is refused with “no such distributable release”. It never falls back to an unreleased revision. Without channel or release_id, the call reads the newest revision instead.
4

Pin an agent to one release (optional)

To keep an agent on one exact version even after you release a newer one, pass release_id instead of channel:
To find a release ID, open the metric’s History in Studio and open a version. Its Version page lists the Release ID under Release and revision IDs. You can’t pass channel and release_id together.A pinned read keeps working when newer versions are released. It stops working if that release is withdrawn or the metric is archived.
5

Search saved queries (optional)

For a question a metric doesn’t cover, the agent can look for trusted SQL with extension__metric__search_queries. Set status to verified to keep only queries whose SQL ran when they were saved. See Search saved queries.Saved queries aren’t released, so the agent always gets the newest revision.

Verify

Compare what the agent read with Studio:
  • In the agent’s registry__get_artifact result, release.version_label matches the Live label in the catalog’s Release column, for example 0.2.0.
  • release.channel is latest, or the channel you released on.
  • metadata.definition.formula matches the formula on the version page in Studio.
If they differ, see An agent reads an old version.

Build an analytics agent with /atlan-analytics

The Metrics app adds four guided skills that build a talk-to-data agent on top of your metrics and saved queries, then measure and improve it. To run them:
  • Claude Code with the atlanai plugin: run /atlan-analytics, optionally with build, improve, or eval and a project name, for example /atlan-analytics improve store-analytics.
  • Any MCP client: use the MCP prompt atlan-analytics that MCP Gateway serves.
What the skills need:
  • A Snowflake MCP connector signed in to your warehouse. The skills run all SQL through it. MCP Gateway runs none.
  • python3, for the bundled eval script.
  • To build the context, the skill downloads the open-source metrics-agent on first use. If it can’t, it falls back to writing the definitions by hand.
The skills keep their state in your project folder under .atlan-analytics/<project>/. That folder holds the eval answers, so the skill asks whether to add it to .gitignore. The skills ask one question at a time and stop after each phase so you can review what they made.