Skip to main content
Glama

Create a page or link goal

create_goal_definition

Creates a goal from a page path (* one segment, ** any), a link to another site, or a button text, form or file from automatic events; it counts past visits at once. Ask before calling. The name can't change later (set a display name with update_goal_customization). Requires the write scope.

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": {
      "name": "<name>",
      "kind": "<kind>"
    },
    "name": "create_goal_definition"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileNodownload only: a file name (pricing.pdf, exact) or an extension (.pdf: any file with it).
formNoform only: the form's id or name attribute, exact, e.g. signup.
hostNooutbound only: the other site, e.g. stripe.com (subdomains included).
kindYespage: someone views a page. outbound: someone clicks a link to another site. click, form, download: a button text, form or file from automatic events (switched on in Settings → Tracking & install → Automatic events).
nameYesGoal name: a letter, then letters, numbers, _ : . or - (e.g. visited_pricing).
pathNoPage path pattern, e.g. /pricing, /blog/* (one segment) or /docs/** (any depth); letter case is ignored. For outbound, optional: the path on the other site.
textNoclick only: the button text, exact but any letter case, e.g. Start free trial.
website_idNoWebsite ID from list_websites (the data-site-id value in the tracking script).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Annotations only carry the generic non-read-only, non-idempotent, non-destructive profile; the description adds substantive traits an agent cannot infer: past visits are counted immediately on creation, the name is immutable afterwards, and the write scope is required. This is exactly the surplus value the description should provide over structured fields.

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?

Two dense sentences with the capability description front-loaded and the constraints trailing. It is compressed to the point of being slightly telegraphic ("counts past visits at once", "Ask before calling"), but no sentence is filler.

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?

For an 8-parameter mutation tool with no output schema, the description covers what it creates, the immediate backfill of historical data, name immutability, and the permission requirement. It omits error behavior (e.g. duplicate name handling) and does not explain how the kind-specific fields interact, which is a minor remaining gap.

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 100%, so the wildcard semantics, kind meanings, and per-kind field constraints are already documented in the schema. The description restates the wildcard pattern briefly but adds no format, default, or constraint detail beyond it, so it sits at the baseline.

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 a specific verb (creates a goal) and enumerates the definition sources it supports — page path with wildcard syntax, outbound link, and click/form/download automatic events — which matches the five-value kind enum. An agent can tell this is the goal-creation tool and not the customization or preview sibling.

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 a real precondition ("Ask before calling", i.e. confirm with the user first) and routes renaming to update_goal_customization when a display name is wanted. It does not mention preview_goal_definition as a validation step before creation, which is the obvious alternative a sibling listing implies.

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