Skip to main content
Glama
mail-mcp

mail-mcp

by honest-magic

register_oauth2_account

Destructive

Stores OAuth2 client ID, secret, refresh token, and token endpoint for an IMAP account in the system keychain to set up secure authentication.

Instructions

Store OAuth2 credentials (client ID, secret, refresh token) for an IMAP account in the system keychain.

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": {
      "accountId": "<accountId>",
      "clientId": "<clientId>",
      "clientSecret": "<clientSecret>",
      "refreshToken": "<refreshToken>",
      "tokenEndpoint": "<tokenEndpoint>"
    },
    "name": "register_oauth2_account"
  }
}

Input Schema

NameRequiredDescriptionDefault
clientIdYesOAuth2 Client ID
accountIdYesThe ID of the account
clientSecretYesOAuth2 Client Secret
refreshTokenYesOAuth2 Refresh Token
tokenEndpointYesOAuth2 Token Endpoint URL
confirmationIdNoConfirmation token from a prior confirmation-required response. Required to execute write operations when server is in --confirm mode.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.4.0

TDQS

B3.3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false and destructiveHint=true, so the description is not obligated to establish that this is a mutating operation. It does add real context by disclosing that credentials are persisted to the system keychain, but it does not address whether existing credentials are overwritten, whether OS keychain unlock/permission prompts may occur, or whether the stored secret is returned anywhere — relevant gaps given destructiveHint=true.

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?

A single front-loaded sentence with the verb, the credential set, the target account type, and the storage location; no filler or redundancy.

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

Completeness3/5

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

This is a security-sensitive mutation with six parameters and no output schema, so the description should carry more weight than one line. It covers what is stored and where, but omits overwrite behavior, prerequisites, and failure/confirmation semantics, leaving the agent to infer the operational contract.

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 six parameters are already documented, establishing a baseline of 3. The description echoes which fields are stored (client ID, secret, refresh token) but adds nothing about tokenEndpoint, accountId, or the confirmationId write gate beyond what the schema states.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb and resource — storing OAuth2 client ID, secret, and refresh token for an IMAP account — and adds a destination (the system keychain). That is enough to distinguish it from every sibling (all of which deal with mail, folders, filters, or drafts), though it does not explicitly contrast with any of them.

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

Usage Guidelines2/5

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

There is no when-to-use or when-not-to-use guidance, no stated prerequisite that the IMAP account must already exist, and no mention of the confirmation-required write flow. The agent must infer the calling context from the name and schema alone.

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