Skip to main content
Glama

test_mail_account

Read-only

Verify whether IMAP mail account settings can connect to the server. Test new credentials directly, or pass a saved account's ID with its masked password to validate existing configurations.

Instructions

Test IMAP connection settings without saving them. Pass the full account fields. To test a SAVED account, pass its id together with the masked password exactly as get_mail_account returns it (all asterisks) — Paperless then uses the stored password (without id it would try the literal asterisks and report a login failure). Note: Paperless 3.2 answers an unreachable server or refused connection with a bare HTTP 500 rather than a message — treat a 500 as 'could not connect'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoID of a saved account whose stored password should be used
nameYes
ownerNo
is_tokenNotrue when `password` is an OAuth/app token
passwordYesIMAP password or OAuth token. Write-only: Paperless returns it masked as all asterisks (at least 10, one per character), and sending any all-asterisks value back leaves the stored password unchanged.
usernameYes
imap_portYesUsually 993 (SSL) or 143 (STARTTLS / none)
imap_serverYes
account_typeNo1=IMAP, 2=Gmail OAuth, 3=Outlook OAuth
character_setNoe.g. UTF-8 (default) or US-ASCII
imap_securityNo1=no encryption, 2=SSL, 3=STARTTLS

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.2.0

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the readOnlyHint annotation, the description explains the masked-password round-trip behavior, the login failure that occurs if id is omitted, and the Paperless 3.2 HTTP 500 response for unreachable servers. These are exactly the non-obvious behaviors an agent needs to interpret results correctly.

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?

Three sentences with the core purpose front-loaded, immediately followed by the two most important invocation caveats. The long second sentence is dense but information-rich, and the HTTP 500 warning is placed last as a trailing interpretive note. No sentence is wasted.

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?

Covers both new and saved account scenarios, explains the password masking trap, and clarifies how to interpret a bare 500 response. For a read-only test endpoint with no output schema, this provides everything an agent needs to call and evaluate the tool correctly.

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?

The description adds critical meaning for id and password: id switches to the stored password, and password must be sent as the exact asterisk-masked value returned by get_mail_account. The schema already describes most other parameters, so this adequately compensates for the 64% schema coverage.

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 states clearly that the tool 'Test[s] IMAP connection settings without saving them,' giving a specific verb and resource. This differentiates it from account creation/update tools and from process_mail_account by emphasizing the test-only, non-persisting nature.

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 explicit usage modes: pass full account fields for a new account, or pass id plus the masked password for a saved account, and tells the agent how to obtain that masked password from get_mail_account. It does not explicitly mention alternative test tools like test_storage_path, so it falls just short of a 5.

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