Skip to main content
Glama

Statable Analytics

Create goal

create_goal
Idempotent

Add a goal to a site. A goal is EITHER a custom event (event_name), OR a page (path with operator), OR a scroll depth — give one of the three, not several. operator: "e" exact, "b" begins with, "c" contains. A duplicate name is refused (goal_exists).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesShown in reports, e.g. "Signup".
pathNoPage path, e.g. "/thanks". Pair with operator.
siteYessite_id from list_sites.
operatorNoHow path is matched: e exact, b begins with, c contains.
event_nameNoCustom event to count, e.g. "Signup". Use list_prop_keys or top_custom_events to see what the site already sends.
scroll_depthNoPercent scrolled.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. First observed

TDQS

A4.3/5.0
Behavior4/5

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

The description goes beyond the annotations by explicitly stating that a duplicate name is refused (goal_exists) and that the three goal types are mutually exclusive. The idempotentHint annotation is complemented rather than contradicted: retrying after a duplicate would not change state. It does not disclose permissions or response details, but the core behavioral constraints are present.

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 description is compact and front-loaded, with the core purpose in the first sentence and constraints following. The operator value explanations repeat the schema somewhat, but they are brief and support the mutually exclusive choice described earlier.

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 a tool with six parameters and no output schema, the description covers the essential invocation logic: which parameter groups are valid, how operator matching works, and what happens on duplicate names. It does not describe the success response, but the input-side guidance is sufficient for correct invocation.

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?

The schema already documents every parameter, so the baseline is 3. The description adds critical semantics the schema does not encode: the one-of-three exclusivity and the pairing of path with operator. This materially improves an agent's ability to construct a valid call.

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 opens with a specific verb and resource, 'Add a goal to a site,' and immediately distinguishes goals from the sibling tools like create_funnel and create_site. It also enumerates the three possible goal forms, so an agent knows exactly what object this tool creates.

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?

The description gives clear context for when to call the tool: when adding a new goal. It also provides strong usage constraints—choose exactly one of event, page, or scroll depth—and warns that duplicate names are refused. It does not explicitly name alternatives like update_goal or list_goals, but the context is clear enough to avoid misuse.

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