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 update_issue_status for issues. Requires websiteId or domain with a workspace token.

Input 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

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?

Goes well beyond the destructiveHint annotation by disclosing irreversibility, that only completions are removed while the definition persists, that omitting a date range deletes across all history, the row-count return value, and the workspace-token/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?

Dense but front-loaded, leading with the permanent destructive action and scope before the requirements. Seven sentences is on the long side for a single tool, though nearly every sentence carries unique operational information.

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?

An output schema exists so return values need not be detailed, yet the description still notes the deleted-row count. For a zero-required-parameter destructive tool, it covers the failure precondition, confirmation protocol, and scope limits an agent needs.

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 description coverage is already 100%, so the baseline is 3, but the description adds real semantics the schema lacks: filters combine with AND, startAt and endAt are independent so a single bound is allowed, and no date range means whole-history deletion.

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 precise scope of the deletion. It explicitly distinguishes itself from siblings by noting the goal definition stays and 'get_goals still lists it', plus routing issues to update_issue_status.

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 preconditions (at least one of visitorId/name/startAt/endAt required), the semantics of the filters (AND combination, independent bounds), and an operational guardrail (restate website, filters, and range and get explicit confirmation first). It also names the alternative tool for issues.

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