Skip to main content
Glama

Get conversions for a goal

get_conversions
Read-only

How many visits reached a goal, and the conversion rate (conversions / visits), for the whole site and by one dimension of the visit: source, utm_campaign, utm_medium, utm_source, entry_page, country, device, hostname (hostname: the domain a visit began on). With filter, only the visits that match it (e.g. the goals of the visits from Substack, by entry page). Without goal, gives every goal of the site with its totals, and with dimension each goal by that dimension too (5 rows each unless limit). Use it to tell which sources or campaigns lead to sales or sign-ups. Rows are ordered by visits, so sources that bring visits and no conversion show too. A total also gives unmeasured: conversions the site's server confirmed with no measured visit (included in conversions, in no rate and no row), and never_received when the goal's event has never arrived (a zero is then not "nobody").

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "site": "<site>"
    },
    "name": "get_conversions"
  }
}

Input Schema

NameRequiredDescriptionDefault
toNoEnd date YYYY-MM-DD (site timezone), included.
fromNoStart date YYYY-MM-DD (site timezone), with `to`.
goalNoThe goal's name or label, as list_events gives it. Omit to list every goal with its totals.
siteYesThe site: its domain (example.com), its id, or its public id. See list_sites.
limitNoDefault 10.
filterNoOnly the visits whose dimension has this value, read by their first event (one filter, never more). E.g. the entry pages of the visits from Substack: dimension entry_page, filter { dimension: source, value: Substack }.
periodNoA preset period ending today: today, 7d, 30d, 90d, 1y (one year) or all (everything since the site's first visit, five years at most). Default 30d. Ignored when from/to are given.
dimensionNoDefault source. Use utm_campaign for campaigns.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / dimension / enum
      Previous value: -[
      -  "source",
      -  "utm_campaign",
      -  "utm_medium",
      -  "utm_source",
      -  "entry_page",
      -  "country",
      -  "device"
      -]New value: +[
      +  "source",
      +  "utm_campaign",
      +  "utm_medium",
      +  "utm_source",
      +  "entry_page",
      +  "country",
      +  "device",
      +  "hostname"
      +]
    • addedInput schema / properties / filter
      Added value: +{
      +  "description": "Only the visits whose dimension has this value, read by their first event (one filter, never more). E.g. the entry pages of the visits from Substack: dimension entry_page, filter { dimension: source, value: Substack }.",
      +  "properties": {
      +    "dimension": {
      +      "enum": [
      +        "source",
      +        "utm_source",
      +        "utm_medium",
      +        "utm_campaign",
      +        "entry_page",
      +        "hostname",
      +        "country",
      +        "device"
      +      ],
      +      "type": "string"
      +    },
      +    "value": {
      +      "description": "The value as get_breakdown gives it: \"Substack\", \"Direct\", \"/pricing\", \"app.example.com\", \"FR\"…",
      +      "maxLength": 500,
      +      "minLength": 1,
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "dimension",
      +    "value"
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.5/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Goes well past readOnlyHint by explaining row ordering (by visits, so zero-conversion sources still appear), the `filter` restriction (one dimension, never more), `period` being ignored when from/to are given, and the default limit. It also discloses two measurement caveats that change interpretation: `unmeasured` conversions counted in `conversions` but in no rate or row, and `never_received` meaning a zero is not evidence of nobody converting.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads the core metric before the dimension list and modes, and every clause carries information rather than filler. It is dense to the point of being sprawling, with stacked parentheticals, but little is genuinely removable.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description does the work of describing the return: per-goal and per-dimension rows (5 each unless `limit`), totals, plus the `unmeasured` and `never_received` fields. It stops short of naming the actual row columns or how the rate appears when visits are zero, leaving a small gap for an 8-parameter reporting tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is already 100%, so the baseline is 3, but the description adds real meaning: hostname is the domain a visit began on, dimension defaults to source with utm_campaign for campaigns, omitting `goal` lists every goal, and filter values come "as get_breakdown gives it" with a concrete cross-dimension example. It does not explain the from/to pairing rules beyond "with `to`".

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States the exact metric pair (visits that reached a goal, and conversions/visits), the scope (whole site, plus one dimension), and enumerates the eight allowed dimensions including a definition for hostname. It is immediately distinguishable from a generic breakdown tool because it is goal-anchored and rate-producing.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an explicit use case ("tell which sources or campaigns lead to sales or sign-ups") and explains the two operating modes: with `goal` versus without `goal`, plus how `filter` narrows to a subset. It does not name a sibling alternative (e.g. get_breakdown, get_campaign_result) or say when to prefer one, so routing between tools is left partly to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources