Skip to main content
Glama

Mark an event as a goal, or stop

set_goal
Idempotent

Marks one of a site's declared events as a goal (what the site is for: a sale, a sign-up, a contact), so that conversions are counted for it by source and campaign, or removes the mark. Past visits are counted too. The event must be declared first (create_event). For a goal that is not a payment (a click to Amazon, a sign-up), value is what one conversion is worth to the owner: their estimate, shown as estimated and never added to revenue. Set it only with the amount the owner gives.

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>",
      "event": "<event>",
      "goal": "<goal>"
    },
    "name": "set_goal"
  }
}

Input Schema

NameRequiredDescriptionDefault
goalYesTrue to make it a goal, false to stop.
siteYesThe site: its domain (example.com), its id, or its public id. See list_sites.
eventYesThe event's name or label, as list_events gives it.
valueNoWhat one conversion is worth to the owner, in the currency's units (2.10). null removes it; omit to leave it as it is.
currencyNoThree-letter currency of `value` (EUR, USD…). Needed with a value.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / currency
      Added value: +{
      +  "description": "Three-letter currency of `value` (EUR, USD…). Needed with a value.",
      +  "pattern": "^[A-Za-z]{3}$",
      +  "type": "string"
      +}
    • addedInput schema / properties / value
      Added value: +{
      +  "anyOf": [
      +    {
      +      "maximum": 1000000000,
      +      "minimum": 0,
      +      "type": "number"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "What one conversion is worth to the owner, in the currency's units (2.10). null removes it; omit to leave it as it is."
      +}
  2. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare idempotent, non-destructive mutation, so the description is not carrying the safety burden. It still adds real behavioral context beyond them: 'Past visits are counted too' discloses retroactive backfill, and it clarifies that value is an owner estimate never added to revenue. It does not describe the response or what happens to conversions already attributed if the goal is removed.

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 core action and its reversal are front-loaded in the first clause, followed by prerequisite and value guidance in a logical order. It is dense but every sentence carries information; the parenthetical examples are slightly verbose but aid understanding.

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 5-parameter mutation with no output schema, the definition covers the action, prerequisite, backfill behavior, and the subtle value/currency semantics. The only gap is post-removal behavior and whether existing counted conversions are affected, which an agent might want to know before toggling off.

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 a baseline of 3 would be defensible, but the description adds genuine meaning for `value` — that it is the owner's estimate, displayed as estimated, and excluded from revenue. This explains the semantics of the field rather than restating its type.

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 and resource ('Marks one of a site's declared events as a goal ... or removes the mark') and gives concrete examples of what a goal is (sale, sign-up, contact). It also distinguishes itself from create_event, which declares the event rather than flagging it.

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 clear prerequisite ('The event must be declared first (create_event)') and a conditional rule for the value parameter ('Set it only with the amount the owner gives'). It does not explicitly compare against update_event, which also touches events, so routing is not fully exhaustive.

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