Skip to main content
Glama

delete_sub_account

Destructive

Delete a sub-account. Revokes its API keys, archives the approval channels and declines the pending requests created with its own keys, keeps its history but unlinks it, deletes its message templates, and retires its username for good. The last sub-account cannot be deleted; deleting the primary sub-account makes the oldest remaining one primary (the response names it). In a start_login session: one code first — start_2fa_for_action with action_type profile_delete and targets [this sub-account id]. With an API key alone only an EMPTY sub-account (no API keys, approval channels or pending requests) can be deleted; anything else answers owner_session_required. archive_default_linked is deliberately not offered here: archiving or cancelling everything linked only by default is an irreversible fan-out, so archive each item explicitly instead. Cannot be undone.

ACCESS: needs a Proof account. Authenticate this client (Claude Code: /mcp → Authenticate), or sign in with start_login — either opens this tool — then call this tool again.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "profile_id": "<profile_id>"
    },
    "name": "delete_sub_account"
  }
}

Input Schema

NameRequiredDescriptionDefault
profile_idYesProfile ID

Output Schema

NameRequiredDescriptionDefault
messageNo
projectNo
successNoAlways `true`. The 1.x Go, PHP and Python SDK types carry it as a string, as released; it is typed boolean in the next major.
new_primaryNoNamed when the deleted sub-account is (or was) the primary: the OLDEST remaining sub-account takes over, and messages sent without choosing a sub-account carry its name.
was_primaryNo
hitl_archivedNo
hitl_detachedNo
api_keys_revokedNo
circles_detachedNo
domains_detachedNo
username_retiredNoThe username is retired for good — it can never be claimed again, by anyone.
requests_detachedNo
templates_deletedNo
requests_cancelledNo
confirmations_deniedNo
authorizations_revokedNo
verifications_detachedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

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 and readOnly=false, but the description adds substantial context beyond them: the precise cascade of side effects, that the primary sub-account deletion promotes the oldest remaining one and that the response names it, and that the action cannot be undone. The only minor gap is that it doesn't discuss rate limits or partial-failure behavior if some cascade steps fail.

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?

Front-loaded with the action, then ordered by increasing specificity (effects, constraints, auth path, rejected option). Dense but nearly every sentence carries actionable information; the auth/access paragraph and the archive_default_linked rationale add length that could be tightened without losing meaning.

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, cascading operation this covers effects, irreversibility, authorization paths, the empty-account restriction, and the primary reassignment outcome. An output schema exists so return values need no explanation, and the description still notes the response names the new primary — nothing an agent needs to call it safely 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?

With a single parameter and 100% schema coverage, the schema only says "Profile ID", which is ambiguous. The description resolves that ambiguity by referring to "[this sub-account id]" as the 2FA target, clarifying that the ID identifies the sub-account rather than a generic profile. That is real added meaning beyond the schema, though it is implied rather than stated outright for the profile_id field.

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?

Opens with a specific verb+resource ("Delete a sub-account") and immediately enumerates the concrete effects: API key revocation, approval channel archiving, pending request declines, history retention with unlinking, template deletion, username retirement. This distinguishes it clearly from sibling deletes like delete_profile or delete_circle by naming the exact scope and collateral consequences.

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 the exclusion cases (last sub-account cannot be deleted; API-key-only callers can delete only an EMPTY sub-account, otherwise owner_session_required) and routes the agent to the alternative start_2fa_for_action with the exact action_type and targets needed in a start_login session. It also explains why archive_default_linked is deliberately not offered, which steers the agent away from an irreversible fan-out pattern.

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.