Skip to main content
Glama

Delete Goal Events

delete_goals
Destructive

Permanently delete recorded goal completions matching every filter given (filters combine with AND). At least one of visitorId, name, startAt, or endAt is required or the call fails before reaching the API; startAt and endAt are independent, so one bound alone is allowed. Without a date range, matches are deleted across the whole history. Returns the number of rows deleted. Cannot be undone: restate website, filters, and range and get explicit confirmation first. Deletes completions only; the goal definition stays and get_goals still lists it. Use delete_payments for revenue records and update_issue_status for issues. Requires websiteId or domain with a workspace token.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoDelete completions of this goal name (as listed by get_goals)
endAtNoISO 8601 end of the deletion window, inclusive (e.g. "2026-01-31T23:59:59Z"). May be used without startAt.
domainNoWebsite domain from list_websites (e.g. "example.com"). Alternative to websiteId with a workspace token.
startAtNoISO 8601 start of the deletion window, inclusive (e.g. "2026-01-01T00:00:00Z"). May be used without endAt.
visitorIdNoDelete completions of this visitor (the id get_visitor takes). Combined with the other filters using AND.
websiteIdNoWebsite ID from list_websites. Required with a workspace token unless domain is given; ignored with a website key.
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

TableJSON Schema
NameRequiredDescriptionDefault
resultNoObject with status and data: deleted (number of completions removed) and a confirmation message.

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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#"
  2. 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"
      +}
  3. Changed7 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 / endAt / description
      Previous value: -"ISO 8601 end timestamp"New value: +"ISO 8601 end of the deletion window, inclusive (e.g. \"2026-01-31T23:59:59Z\"). May be used without startAt."
    • changedInput schema / properties / name / description
      Previous value: -"Delete goals matching this event name"New value: +"Delete completions of this goal name (as listed by get_goals)"
    • changedInput schema / properties / startAt / description
      Previous value: -"ISO 8601 start timestamp"New value: +"ISO 8601 start of the deletion window, inclusive (e.g. \"2026-01-01T00:00:00Z\"). May be used without endAt."
    • changedInput schema / properties / visitorId / description
      Previous value: -"Delete goals for this visitor"New value: +"Delete completions of this visitor (the id get_visitor takes). Combined with the other filters using AND."
    • 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 goal event deletion."New value: +"Object with status and data: deleted (number of completions removed) and a confirmation message."
  4. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true, but the description adds substantial context: cannot be undone, requires restating website/filters/range and explicit confirmation, deletes completions only while the definition persists, returns the deleted row count, and requires websiteId or domain with a workspace token.

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?

Front-loaded with the destructive action and confirmation requirement, and nearly every sentence carries unique information. The closing auth sentence partially duplicates the websiteId/domain schema descriptions, a minor redundancy in an otherwise tight block.

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 destructive, 7-param tool with an output schema, the definition covers prerequisites, confirmation, scope boundaries, and sibling alternatives. Nothing an agent needs to invoke it safely 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 semantics the schema lacks: filters combine with AND, at least one is mandatory despite zero required fields, and startAt/endAt are independent bounds. This genuinely extends beyond the structured field descriptions.

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 ('permanently delete recorded goal completions') with the matching scope ('matching every filter given'). It explicitly distinguishes itself from delete_payments and update_issue_status, and clarifies it removes completions only, not the goal definition get_goals still lists.

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?

Gives explicit when-to-use rules and exclusions: at least one of visitorId/name/startAt/endAt is required or the call fails, one date bound alone is allowed, and no range means whole history. It routes revenue deletions to delete_payments and issues to update_issue_status.

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