Skip to main content
Glama

Track Goal Event

track_goal

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 anonymous visitor ID Flowsery assigned on the user's own website) 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. Undo with delete_goals. Requires websiteId or domain with a workspace token.

Input 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 string key-value pairs stored with the completion. More than 10 fails with a 400.
websiteIdNoWebsite ID from list_websites. Required with a workspace token unless domain is given; ignored with a website key.
visitorUidNoAnonymous visitor ID Flowsery assigned on the user's own website (the _fs_vid value). Omit to record an anonymous completion.
workspaceIdNoWorkspace to act in: an id from list_workspaces. Omit to use the default workspace. Use the same workspaceId for every call about the same workspace, since ids from one workspace do not exist in another

Output 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. Changed1 schema field changed
    • changedInput schema / properties / visitorUid / description
      Previous value: -"Visitor UID from the _fs_vid browser cookie of a visitor the tracking script has seen. Omit to record an anonymous completion."New value: +"Anonymous visitor ID Flowsery assigned on the user's own website (the _fs_vid value). Omit to record an anonymous completion."
  2. Changed2 schema fields changed
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • removedOutput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
  3. Changed1 schema field changed
    • changedInput schema / properties / metadata / description
      Previous value: -"Up to 10 custom key-value pairs. Keys: lowercase, max 64 chars. Values: max 255 chars."New value: +"Up to 10 string key-value pairs stored with the completion. More than 10 fails with a 400."
  4. Changed1 schema field changed
    • addedInput schema / properties / workspaceId
      Added value: +{
      +  "description": "Workspace to act in: an id from list_workspaces. Omit to use the default workspace. Use the same workspaceId for every call about the same workspace, since ids from one workspace do not exist in another",
      +  "type": "string"
      +}
  5. Changed5 schema fields changed
    • 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."
  6. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations declare the write/non-destructive/open-world profile, and the description adds substantial context beyond them: append-only semantics ('each call appends a completion, so repeating it counts the goal twice'), goal auto-creation on first use, and the websiteId-or-domain auth requirement.

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?

Five dense sentences, all front-loaded and substantive, with the core action first and edge cases after. The name charset constraint is duplicated verbatim from the schema, which is a small redundancy but not bloat.

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?

With an output schema present, return values need not be explained; the description covers the remaining agent-relevant gaps: idempotency expectations, implicit goal creation, auth prerequisites, and the undo path. Nothing needed to invoke it correctly is missing.

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 the baseline is 3, but the description adds cross-parameter meaning: the websiteId-or-domain-with-workspace-token relationship and the visitorUid attachment behavior. It does repeat the name charset rule already in the schema, so it falls short of a full 5.

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: 'Record one completion of a custom goal.' It is immediately distinguishable from get_goals (reads) and delete_goals (removes), and the auto-creation note clarifies the write semantics.

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?

Explicitly states no setup call is needed, explains when to pass visitorUid versus omit it for an anonymous completion, and names the undo path (delete_goals). Conditions that select each behavior are spelled out rather than implied.

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