Skip to main content
Glama

Create or redefine a goal

goals_save
Destructive

Create a goal, or redefine one with the same name: EVENT (an event name like signup, or name@/path for that event on one page: form_submit@/register is the signup form sent on /register, which t.js reports with no code on the site), PAGEVIEW (a path pattern like /welcome*), CTA (a data-sf value, * for a wildcard), ENGAGED, REVENUE (trial, paid), or CHECKOUT (a visit back from a hosted checkout such as Stripe or Dodo: a payment, seen without any code on the site; match is the return path pattern, * for any). Every goal you create is SOFT. Only the founder makes a goal HARD, in the results app, and the headline conversions count HARD goals once there are any; changing a HARD goal's definition puts it back to SOFT. Say why in note. stage puts it on the way to a payment: interest (clicks and pages before signing up, the signup page itself included), engaged, signup (a finished signup, each way of signing up is its own goal in this stage and the stage counts a session once), active (a signed-up person using the product), paying. Left out, it is read from the goal. 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": {
      "name": "<name>",
      "type": "<type>"
    },
    "name": "goals_save"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYes
noteNo
typeYes
matchNoNeeded except for ENGAGED and CHECKOUT
stageNo
siteIdNo
valueCentsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / stage
      Added value: +{
      +  "enum": [
      +    "interest",
      +    "engaged",
      +    "signup",
      +    "active",
      +    "paying"
      +  ],
      +  "type": "string"
      +}
  2. Added

TDQS

A4/5.0
Behavior4/5

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

Goes well beyond the annotations, which only flag this as a non-read-only, destructive, closed-world write. The description adds the important consequences: same-name calls redefine (overwrite) an existing goal, and redefining a HARD goal silently demotes it to SOFT. 'Free' also discloses cost, though the exact overwrite blast radius (what else is lost on redefinition) is not spelled out.

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?

Dense but every sentence carries operator-relevant information: the enum glosses and the HARD/SOFT rule cannot be trimmed without losing meaning. It is front-loaded with the action, then the type vocabulary, then the stage vocabulary, which is a sensible order for a caller reading top-down.

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

Completeness3/5

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

For a 7-parameter destructive mutation with no output schema, the definition covers the domain vocabulary very well but leaves gaps an agent needs: no guidance on `siteId` scoping, no explanation of `valueCents`, no mention of what the call returns. The enum-heavy content is excellent while the plain scalar parameters are invisible.

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 only 14% schema description coverage, the description must carry nearly all parameter meaning, and it does for five of seven: it defines every `type` enum value with concrete match syntax (form_submit@/register, /welcome*, data-sf value, hosted-checkout return path), explains `match`, `stage`, and the role of `note`. `siteId` and `valueCents` are never mentioned, leaving two parameters undocumented in both places.

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?

Opens with a specific verb+resource: 'Create a goal, or redefine one with the same name', which also discloses the upsert-by-name semantics. It does not explicitly distinguish itself from the sibling goals_list, so an agent must infer the save-vs-list split, but the core action is unmistakable.

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 real usage constraints rather than plain context: every created goal is SOFT, only the founder can make it HARD, and editing a HARD goal reverts it to SOFT. It also prescribes 'Say why in `note`'. It stops short of naming goals_list as the read-only alternative or stating when not to call save.

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