Skip to main content
Glama
Flowsery

flowsery

Official

Delete Goal Events

delete_goals
Destructive

Delete recorded goal completions permanently by filtering with visitor ID, goal name, or date range. Returns the number of deleted rows. Requires explicit filters; action cannot be undone.

Instructions

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.

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. Changed7 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 / 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."
  2. First observedv0.1.0

TDQS

A5/5.0
Behavior5/5

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

Discloses irreversibility ('Cannot be undone') and scoping of deletion ('Deletes completions only; the goal definition stays and get_goals still lists it'). This goes beyond the destructiveHint annotation by explaining the exact extent of the destructive action.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is dense but every sentence carries essential information—purpose, constraints, alternatives, side effects. No redundant or vague phrasing; well organized for quick comprehension.

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?

Given the tool's complexity (destructive, multiple filters, alternative authentication), the description fully covers prerequisites, behavior, side effects, and output (number of rows deleted). No critical information missing for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Every parameter has a description that clarifies its purpose, examples for date formats, and relationships (e.g., websiteId/domain alternatives, visitorId combining with AND). The description adds practical context beyond the schema definitions.

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?

Clearly states the action: 'Permanently delete recorded goal completions matching every filter given'. The resource (goal completions) is specific and distinguishes from sibling tools like delete_payments and get_goals.

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 says when to use alternatives: 'Use delete_payments for revenue records and update_issue_status for issues.' Also details required filter conditions and that startAt/endAt can be used independently, giving clear operational guidance.

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