Skip to main content
Glama

Goals of one campaign

get_campaign_goals
Read-onlyIdempotent

Every goal (funnel marked is_goal) for one campaign of list_campaigns: the campaign's visitor-days at each step, and numbers: its conversions, rate and revenue, exactly the row's goal numbers in list_campaigns with that goal. Step 1 is the campaign's visitors when the funnel starts with any page view (first_step_is_any_pageview), else null. Each goal counts from its own goal.data_from: read its coverage, and goal_note, before quoting. Dates are the project's calendar days, YYYY-MM-DD (timezone: get_project); timestamps are UTC. Omit from/to for the last 28 complete days, ending yesterday. Today is still in progress: a range including it reads as a drop against complete days. Quote counts with every percentage; a big change on a small count is noise, not a finding.

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": {
      "key": "<key>"
    },
    "name": "get_campaign_goals"
  }
}

Input Schema

NameRequiredDescriptionDefault
toNoLast day, YYYY-MM-DD in the project's timezone, inclusive. Default: yesterday, the last complete day.
keyYesThe campaign's key from list_campaigns: the JSON array [utm_campaign, utm_source, utm_medium], as a string.
fromNoFirst day, YYYY-MM-DD in the project's timezone, inclusive. Default: 27 days before 'to'.
traitNoOnly count visitors carrying this session trait value; each goal's steps count by its funnel's trait_scope.
projectNoProject ID, from list_projects. Required when this connection covers more than one project; may be left out when it covers one (and with an API key, which belongs to one project).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already establish read-only, idempotent, closed-world behavior, and the description adds substantial context on top: each goal counts from its own goal.data_from, coverage/goal_note must be inspected before quoting, step 1 is null when first_step_is_any_pageview is false, and today's partial data distorts comparisons. This is exactly the kind of caveat an agent cannot get from the schema or annotations.

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?

Purpose and scope are front-loaded in the first clause, and nearly every sentence carries operational content (null step, coverage, date semantics, quoting rule). It is dense and somewhat run-on, and the coverage/quoting guidance could be tighter, but there is little dead weight.

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

Completeness5/5

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

For a read-only reporting tool with full schema coverage and no output schema, the description covers what is returned, how nulls arise, how dates and timezones behave, and what must be checked before reporting numbers. An agent has enough to call it correctly and interpret the result without further sources.

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?

With 100% schema coverage the baseline is 3, but the description adds meaning: from/to omitted means the last 28 complete days ending yesterday (not an arbitrary default), and key is defined as a campaign from list_campaigns. The trait parameter is not addressed in the description at all, which keeps it below a 5.

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?

The description names a precise verb+resource ('Every goal (funnel marked is_goal) for one campaign of list_campaigns') and enumerates exactly what comes back: per-step visitor-days, conversions, rate and revenue. It also delimits itself against list_campaigns by saying these are 'exactly the row's goal numbers in list_campaigns with that goal', so an agent can tell the per-campaign drill-down apart from the list view.

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?

It gives concrete operating guidance: omit from/to for the last 28 complete days, today is incomplete so including it reads as a drop, read coverage and goal_note before quoting, and always quote counts alongside percentages. It stops short of naming a sibling alternative (e.g. get_funnel or get_funnel_trend) for funnel-level rather than campaign-level goal data, so routing across siblings is only implied.

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