Skip to main content
Glama
Flowsery

flowsery

Official

Track Goal Event

track_goal

Record a custom goal completion, creating the goal on first use. Optionally attribute to a visitor via visitorUid, or leave anonymous.

Instructions

Record one completion of a custom goal. The goal is created on first use, so no setup call is needed; names are lowercase letters, digits, underscores, and hyphens, max 64 chars. Pass visitorUid (the _fs_vid cookie value of a visitor the tracking script has already seen) so the completion attaches to that visitor's sessions and source; omit it for an anonymous completion. Each call appends a completion, so repeating it counts the goal twice. Use track_payment for revenue, which records a payment goal on its own. Undo with delete_goals. Requires websiteId or domain with a workspace token.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesGoal name: lowercase letters, numbers, underscores, hyphens only (max 64 chars). E.g. "newsletter_signup", "add-to-cart"
domainNoWebsite domain from list_websites (e.g. "example.com"). Alternative to websiteId with a workspace token.
metadataNoUp to 10 custom key-value pairs. Keys: lowercase, max 64 chars. Values: max 255 chars.
websiteIdNoWebsite ID from list_websites. Required with a workspace token unless domain is given; ignored with a website key.
visitorUidNoVisitor UID from the _fs_vid browser cookie of a visitor the tracking script has seen. Omit to record an anonymous completion.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultNoObject with status and data: a confirmation message. The completion itself is written asynchronously and appears in get_goals shortly after.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.1.1
    • changedInput schema / properties / domain / description
      Previous value: -"Website domain to query. Required when using a workspace token unless websiteId is provided."New value: +"Website domain from list_websites (e.g. \"example.com\"). Alternative to websiteId with a workspace token."
    • changedInput schema / properties / name / description
      Previous value: -"Goal name — lowercase letters, numbers, underscores, hyphens only (max 64 chars). E.g. \"newsletter_signup\", \"add-to-cart\""New value: +"Goal name: lowercase letters, numbers, underscores, hyphens only (max 64 chars). E.g. \"newsletter_signup\", \"add-to-cart\""
    • changedInput schema / properties / visitorUid / description
      Previous value: -"Visitor UID from the _fs_vid browser cookie"New value: +"Visitor UID from the _fs_vid browser cookie of a visitor the tracking script has seen. Omit to record an anonymous completion."
    • changedInput schema / properties / websiteId / description
      Previous value: -"Website ID to query. Required when using a workspace token unless domain is provided."New value: +"Website ID from list_websites. Required with a workspace token unless domain is given; ignored with a website key."
    • changedOutput schema / properties / result / description
      Previous value: -"Confirmation of the recorded goal event."New value: +"Object with status and data: a confirmation message. The completion itself is written asynchronously and appears in get_goals shortly after."
  2. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only indicate non-readonly, but the description adds critical behavior: the goal is created on first use, each call appends a completion (so repeats count twice), visitorUid attaches completions to sessions/source, and omitting it records anonymously. It also notes the undo path, going well beyond the annotations.

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 dense but every sentence carries essential information: purpose, naming, visitor handling, repetition semantics, alternatives, undo, and auth. It is front-loaded with the core action and logically organized, with no wasted words, though it is slightly long.

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

Completeness5/5

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

For a mutating goal-tracking tool with 5 params and an output schema, the description covers naming constraints, visitor attribution, idempotency (repeat behavior), alternatives, undo, and auth requirements. Nothing essential for correct invocation is missing.

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?

The schema already provides 100% parameter descriptions with clear examples and constraints, so the description adds limited extra meaning. It does reinforce visitorUid's origin and omit-for-anonymous behavior, but this largely duplicates the schema. Baseline 3 applies because the schema carries the semantic load.

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 clearly states the tool records a completion of a custom goal, explains the goal is auto-created on first use, and distinguishes it from track_payment and delete_goals. This gives a specific verb, resource, and scope, making it unambiguous among siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly says to use track_payment for revenue instead, mentions undo via delete_goals, and clarifies the authentication requirement (websiteId or domain with a workspace token). It leaves no ambiguity about when to choose this tool over alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.