Skip to main content
Glama

Clear Account Data

clear_account_data
DestructiveIdempotent

Reset a SANDBOX (pre-go-live) account to empty so it can be seeded again from scratch (governed two-step, destructive). Deletes every transactional row — items, customers, suppliers, sales and purchase orders, inventory, history, signals, 3PL clients — then re-creates the structural defaults a seed needs (default warehouse, store, units, tax rate) and re-derives the onboarding checklist. Users, credentials (including this one), integrations, automation rules and settings survive. LIVE accounts are always refused — this tool can never delete a paying customer's data. Requires an operator (unpinned) credential granted the sandbox.reset capability. Call with preview=true first to get the blast-radius counts and a previewReceipt, confirm with the user, then repeat with the previewReceipt and a fresh idempotencyKey. Afterwards get_onboarding_state shows zero items/orders and the account is ready for import_historical_sales_orders.

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": "clear_account_data"
  }
}

Input Schema

NameRequiredDescriptionDefault
previewNoStep 1 of the required two-step write: set true to receive the blast-radius preview (row counts of what would be deleted, what survives) plus a single-use previewReceipt. Nothing is deleted until the commit call.
idempotencyKeyNoCaller-generated idempotency key; required with previewReceipt to commit. A replay with the same key returns the stored result and never wipes twice.
previewReceiptNoStep 2 of the required two-step write: the receipt returned by the preview call. Supply together with a fresh idempotencyKey to commit; calls without it are refused.

Output Schema

NameRequiredDescriptionDefault
okNo
statusNo
clearedNo
messageNo
previewNo
expiresAtNo
tenantNameNo
actionItemIdNo
confirmationNo
correlationIdNo
approvalResultNo
idempotencyKeyNo
previewReceiptNo
idempotentReplayNo
structuralDefaultsRestoredNo
onboardingChecklistResyncedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true and idempotentHint=true, yet the description adds substantial context beyond them: the exact row families deleted, what survives (users, credentials including this one, integrations, rules, settings), the required operator capability (sandbox.reset), and the mandatory preview-then-commit sequencing.

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?

Despite being a single dense paragraph, it is front-loaded with the core purpose, then sequencing, then scope exclusions, then prerequisites, then post-conditions. Each sentence carries distinct information with no padding.

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, capability-gated, two-step mutation this covers blast radius, survival list, auth requirements, refusal conditions, and post-state verification. An output schema exists, so return shape needn't be described, and the tool's complexity is fully accounted for.

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 parameters are already documented. The description nonetheless adds operational meaning: preview must be the first call and confirmed with the user, then the commit must pair the returned previewReceipt with a FRESH idempotencyKey. The 'fresh key' emphasis is the main addition over the schema text.

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?

"Reset a SANDBOX (pre-go-live) account to empty so it can be seeded again from scratch" gives a specific verb, resource, and scope. It immediately separates itself from seeding/import siblings and states the destructive nature up front.

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?

Explicit when-to-use (pre-go-live reset before reseeding) and an explicit when-not (LIVE accounts are always refused, never a paying customer's data). It also names the follow-on tools — get_onboarding_state for verification and import_historical_sales_orders for the next step.

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