Skip to main content
Glama

Preview a page or link goal

preview_goal_definition
Read-onlyIdempotent

Before creating a goal without code, see how many visitors would have completed it in the last 30 days and how many of them paid. kind page needs path; outbound needs host (path optional); click needs text, form needs form and download needs file (a button text, form or file from automatic events).

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": {
      "kind": "<kind>"
    },
    "name": "preview_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).
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/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed world), and the description adds real value on top: the 30-day lookback window and the two return measures (completions and paid visitors). It does not mention latency, sampling, or whether the preview reflects historical replays versus stored data.

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?

The outcome and the timing constraint are front-loaded in one sentence, and the second sentence compresses five conditional parameter rules into a single line. The phrasing ('kind page needs path', 'download needs file') is telegraphic and takes a re-read, 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?

With no output schema, the description correctly supplies what comes back (completion count and paid count) and the 30-day horizon, and it covers the conditional-parameter matrix for a 7-parameter tool. What remains unstated is whether results are estimated, cached, or scoped to a website_id the caller must supply.

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 100%, so baseline would be 3, but the description adds cross-field requirements the per-property schema cannot express: page needs path, outbound needs host with optional path, click needs text, form needs form, download needs file. It also clarifies that the last three depend on automatic events, which reinforces the enum descriptions rather than merely repeating them.

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?

The description states a specific outcome: it reports how many visitors would have completed a goal in the last 30 days and how many of them paid. The opening clause ('Before creating a goal without code') positions it relative to goal creation, though it never names the create_goal_definition sibling explicitly.

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 a clear usage context — run this before creating a code-free goal — which implies the alternative (skip preview and create directly). It does not spell out when to skip it or what to do if the preview shows zero conversions, so it stops short of full when/when-not guidance.

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