Skip to main content
Glama

Delete Payments

delete_payments
Destructive

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

Input Schema

TableJSON 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

TableJSON Schema
NameRequiredDescriptionDefault
resultNoObject with status and data: deleted (number of payment records 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 / 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."
  4. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true, so the description builds on that with concrete consequences: deletion cannot be undone, removes revenue from every report and visitor profile, returns the number of rows deleted, and fails before reaching the API if no filter is given. It also explains that filters combine with AND and that missing date range deletes across all history. No contradiction with annotations.

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 front-loads the destructive action, then flows through filters, required constraints, consequences, alternatives, and auth. Every sentence carries operational or safety-relevant information, which is appropriate for a high-risk deletion tool.

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 destructive operation, seven filters, an output schema, and annotations covering the safety profile, the description supplies everything an agent needs: required filter semantics, date-range behavior, auth context, irreversibility, return value, and the correct alternative for refunds. No material gap remains.

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% and documents each parameter individually, so the baseline is 3. The description adds combination and requiredness semantics beyond the schema: filters combine with AND, startAt and endAt are independent and one bound alone is allowed, and at least one filter is required. That is meaningful added value, though it does not fully restate per-parameter meaning already in the schema.

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?

Starts with a precise verb and resource: "Permanently delete analytics payment records." It immediately scopes the action by excluding refunds and provider changes, and later names track_payment as the alternative for refunds, so an agent can distinguish it from siblings without opening any schema.

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 when to use the sibling instead ("To record a refund that already occurred, use track_payment with isRefund") and when not to use this tool (refunds, provider changes). It also gives prerequisites: at least one of transactionId, visitorId, startAt, or endAt must be supplied, websiteId or domain with workspace token is required, and explicit confirmation should be obtained first.

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