MCP tool reference

get_metric

Get a metric by ID.

Get a metric by ID.

Permissions

{
  "ability": "mcp:read or mcp:write",
  "role": "Team membership and applicable entity view policies are required.",
  "plan": "The billing account must have the MCP entitlement. Writes also require a writable billing mode and applicable entity limits.",
  "team": "The bearer token selects exactly one Team. Other team_id values cannot change the tenant."
}

Input

{
  "properties": {
    "metric_id": {
      "description": "Metric ID",
      "type": "integer"
    }
  },
  "type": "object",
  "required": [
    "metric_id"
  ]
}

Output

{
  "type": "object",
  "properties": {
    "found": {
      "type": "boolean"
    },
    "data": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer"
            },
            "project_id": {
              "type": [
                "integer",
                "null"
              ]
            },
            "name": {
              "type": "string"
            },
            "description": {
              "type": [
                "string",
                "null"
              ]
            },
            "type": {
              "type": [
                "string",
                "null"
              ],
              "enum": [
                "average-per-user",
                "rate-per-user",
                "average-per-session",
                "rate-per-session",
                null
              ]
            },
            "winning_direction": {
              "type": [
                "string",
                "null"
              ],
              "enum": [
                "increasing",
                "decreasing",
                null
              ]
            }
          },
          "required": [
            "id",
            "project_id",
            "name",
            "description",
            "type",
            "winning_direction"
          ]
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "found",
    "data"
  ]
}

Examples

Request arguments

{
  "metric_id": 101
}

Result

{
  "found": true,
  "data": {
    "id": 101,
    "project_id": 1,
    "name": "Checkout conversion",
    "description": null,
    "type": "average-per-user",
    "winning_direction": "increasing"
  }
}

Request arguments

{
  "metric_id": 101
}

Result

{
  "found": false,
  "data": null
}

Errors

[
  {
    "status": 401,
    "description": "Missing, expired, or revoked bearer token."
  },
  {
    "status": 403,
    "description": "Missing MCP ability, team membership, plan entitlement, or user permission."
  },
  {
    "status": 404,
    "description": "The MCP server is disabled."
  },
  {
    "status": 429,
    "description": "Rate limited; honor Retry-After before retrying."
  },
  {
    "description": "Tool execution or validation failures are MCP error results. Inspect isError; a successful HTTP status alone does not indicate a successful tool call."
  }
]

An expired or revoked key cannot connect. A missing ability, role, feature entitlement, or team access prevents the operation. See authentication.

Was this article helpful?

Need more help? Copy this article's details and paste them into a request on our feedback portal. You may need to sign in.

Open feedback portal

On this page