Skip to main content
Glama

add_account

Add a shared 2FA account from a Base32 secret or otpauth:// link and assign it to groups from list_groups, so agents can generate its TOTP codes by id later.

Instructions

Adds one shared 2FA account from its secret and puts it in the chosen groups. Call list_groups first: only groups from list_groups are accepted, and a token limited to groups must put the account in at least one of them. All or nothing: if any input or group id is refused, nothing is added. Returns the new account's id, name, issuerDomain and groups, never a code: call get_otp with the id to read one. Errors start with a code, for example GROUP_REQUIRED or SECRET_INVALID.

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": {
      "secret": "<secret>"
    },
    "name": "add_account"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoName for the account, usually the service it signs in to. Required unless secret is an otpauth:// link with an issuer or label.
secretYesThe 2FA secret: a Base32 key, or an otpauth:// link from the setup QR code. One account per call: a Google Authenticator export link (otpauth-migration://) is refused.
group_idsNoIds of the groups to add the account to, from list_groups. Optional for an unscoped token; at least one for a token limited to groups. Each id once.
descriptionNoOptional notes about the account.
issuer_domainNoOptional domain of the service, for example github.com. Looked up from the name when left out.

Output Schema

NameRequiredDescriptionDefault
idNo
nameNo
errorNo
groupsNo
issuerDomainNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.3

TDQS

A4.4/5.0
Behavior5/5

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

No annotations are supplied, so the description must carry the full behavioral burden, and it does: it declares atomicity ('All or nothing: if any input or group id is refused, nothing is added'), the exact returned fields, a security-relevant exclusion ('never a code'), and named error codes. It also discloses the authorization constraint for group-scoped tokens and the refusal of otpauth-migration links.

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?

Every sentence carries operational weight: the sendoff order (list_groups first), the atomicity guarantee, the return shape and the get_otp follow-up, then the error-code convention. It is tight and front-loaded, with no filler or restating of the tool name.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The complex semantic (atomic create with group constraints and no secret leakage) is fully explained, and the output schema covers the returned fields while the description clarifies that no OTP code is returned. About the only thing left implicit is what happens on partial group validation with duplicate ids, which is minor.

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

Parameters3/5

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

Schema description coverage is 100%, so all five parameters are already documented, including the conditional requirement on name and the group_ids scoping rule, which makes 3 the baseline. The description adds little that is specific to individual parameters beyond restating that the secret yields exactly one account and that migration links fail; most of its content is tool-level behavior rather than parameter semantics.

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?

The description opens with a specific verb and resource: 'Adds one shared 2FA account from its secret and puts it in the chosen groups.' That scope, one account per call plus group assignment, clearly separates it from list_accounts and get_otp, which do different things with existing accounts.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives an explicit prerequisite ('Call list_groups first: only groups from list_groups are accepted') and a token-scoped rule ('a token limited to groups must put the account in at least one of them'). It also routes the agent to a sibling ('call get_otp with the id to read one'). The only gap is that it doesn't say when not to use this tool versus some bulk import path, but given the sibling set, that condition is narrow.

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

Deploy Server

Other Tools