Skip to main content
Glama

Set a site's goals

analytics_set_goals
Idempotent

The conversions to count, replacing the site's goals: a page reached ({"name": "Order placed", "page": "/checkout/done"}) or a custom event, optionally with props ({"name": "Pro signup", "event": "Signup", "props": {"plan": "pro"}}). analytics_stats then shows each goal's visitors, conversions, conversion rate and revenue (from conecto("Purchase", {...}, {revenue: 49.9, currency: "USD"})). An empty list removes them. Free.

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>",
      "goals": "<goals>"
    },
    "name": "analytics_set_goals"
  }
}

Input Schema

NameRequiredDescriptionDefault
siteYesThe site's domain (e.g. halversoncycle.example) or its site_id.
goalsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare idempotent=true and destructive=false, but the description adds the crucial replace semantics ('replacing the site's goals') and the empty-list removal behavior, which is the destructive-adjacent detail the annotations do not convey. 'Free' is a useful billing note. It doesn't mention the 20-goal cap, which lives in the schema.

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

Conciseness5/5

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

One paragraph, front-loaded with the core action, with the two JSON examples and the analytics_stats tie-in each doing real work. No repeated or filler sentences.

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?

No output schema, and the description covers what the goals produce downstream (visitors, conversions, conversion rate, revenue) and how removal works, which is enough to call the tool confidently. The notify behavior is left to the schema, a minor gap for a write tool with nested objects.

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

Parameters3/5

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

Schema coverage is 50%, and the description supplies worked examples for the goal object ('page': '/checkout/done', 'event': 'Signup', 'props': {'plan': 'pro'}) plus revenue via conecto, which meaningfully supplements the schema. However it never touches the $notify option or the goal-list cap, so the schema gap is only partly filled.

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

Purpose4/5

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

States the specific verb and resource: the conversions to count, replacing the site's goals, with a page-reached vs custom-event distinction. An agent can identify it as the goal-configuration write for a site. The phrasing is slightly indirect ('the conversions to count') and doesn't distinguish it from analytics_define_events by name, but the resource is unambiguous.

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

Usage Guidelines3/5

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

Gives concrete when-signals: 'An empty list removes them' and 'analytics_stats then shows each goal's visitors...' which implies the follow-up read. It never states when to prefer this over analytics_define_events or analytics_track, so the agent must infer the boundary between defining goals and defining events.

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