Skip to main content
Glama
flowsery

flowsery

Official

Delete Payments

delete_payments
DestructiveIdempotent

Permanently removes analytics payment records matching transaction, visitor, or date filters without refunds or provider changes; at least one filter is required and deletion cannot be undone.

Instructions

Permanently delete analytics payment records, without issuing refunds or changing a payment provider. Deletes records matching every filter given (filters combine with AND): one transactionId, all payments of a visitorId, and/or a creation window. At least one of transactionId, visitorId, 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 and removes the revenue from every report and visitor profile, so restate website, filters, and range and get explicit confirmation first. To record a refund that already happened, use track_payment with isRefund instead. Requires websiteId or domain with a workspace token.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "delete_payments"
  }
}

Input Schema

NameRequiredDescriptionDefault
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 all payments of this visitor (the id get_visitor takes)
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
transactionIdNoDelete the single payment with this transaction ID. Combined with the other filters using AND.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changedv1.5.0
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • 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"
      +}
    • removedOutput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • addedOutput schema / properties / result / additionalProperties
      Added value: +true
    • removedOutput schema / properties / result / description
      Removed value: -"Object with status and data: deleted (number of payment records removed) and a confirmation message."
    • addedOutput schema / properties / result / properties
      Added value: +{
      +  "data": {
      +    "items": {
      +      "additionalProperties": true,
      +      "properties": {
      +        "deleted": {
      +          "description": "Payment records removed",
      +          "type": "number"
      +        },
      +        "message": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "deleted"
      +      ],
      +      "type": "object"
      +    },
      +    "type": "array"
      +  },
      +  "status": {
      +    "description": "\"success\" on every successful call",
      +    "type": "string"
      +  }
      +}
    • addedOutput schema / properties / result / required
      Added value: +[
      +  "status",
      +  "data"
      +]
    • addedOutput schema / properties / result / type
      Added value: +"object"
    • addedOutput schema / required
      Added value: +[
      +  "result"
      +]
  2. 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 / 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 / transactionId / description
      Previous value: -"Delete the payment with this transaction ID"New value: +"Delete the single payment with this transaction ID. Combined with the other filters using AND."
    • changedInput schema / properties / visitorId / description
      Previous value: -"Delete all payments for this visitor"New value: +"Delete all payments of this visitor (the id get_visitor takes)"
    • 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 payment record deletion."New value: +"Object with status and data: deleted (number of payment records removed) and a confirmation message."
  3. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare destructive=true, idempotent=true, and readOnlyHint=false, so the safety profile is known; the description adds real context on top: deletions are irreversible, revenue disappears from every report and visitor profile, and confirmation should be sought. It also discloses the return value (row count) and the auth requirement (websiteId/domain with a workspace token). The only minor gap is that it doesn't say what happens when zero rows match or how large deletions are handled.

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?

Purpose and destructive warning are front-loaded, and the sentences are dense with payload information rather than filler. It is long for one paragraph and the trailing auth sentence could be tighter, but nearly every clause carries an operational fact.

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, zero-required-parameter tool the description covers the mandatory usage constraint, filter composition, irreversibility, confirmation advice, auth requirements, and the alternative tool. With an output schema present it need not elaborate return structure, and nothing an agent needs before calling 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 genuinely adds semantics the schema lacks: filters combine with AND, startAt and endAt are independent bounds, omitting both means whole-history scope, and at least one filter is mandatory even though the schema lists no required parameters. That last point is not derivable from the schema alone.

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 analytics payment records') and immediately scopes it by negation ('without issuing refunds or changing a payment provider'), which separates it from any refund/provider-side operation. The sibling distinction is made explicit by naming track_payment with isRefund as the alternative.

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 both when-to-use and when-not-to-use: this tool for cleaning up records, track_payment with isRefund for recording an actual refund. It also states the hard precondition that at least one of transactionId, visitorId, startAt, or endAt is required or the call fails, and that a range-less call deletes across all history.

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