Skip to main content
Glama

Test a source connection

test_connection
Read-only

Tests a connected mailbox: reading (IMAP) and drafting/sending (SMTP). Returns ok for each, and when it fails an errorCode with a plain explanation (wrong or expired app password, IMAP disabled, server unreachable...). Diagnoses a mailbox that shows status ERROR in list_accounts or that mail tools fail to reach. Also tests an OpenAI Ads account (type openai_ads): whether its API key still opens the ad account, and a Microsoft Advertising account (type microsoft_ads): whether its access still lists the ad accounts, an Aircall account (type aircall): whether its API key still opens the company, and a Bing Webmaster Tools account (type bing_webmaster): whether its access still lists the sites, a Pexels account (type pexels): whether its API key is still accepted, with the remaining request quota, a Shutterstock account (type shutterstock): whether its access still opens the account, and a Twilio account (type twilio): whether its API key still opens the Twilio account. Mail, OpenAI Ads, Microsoft Advertising, Aircall, Bing Webmaster, Pexels, Shutterstock and Twilio accounts only.

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>"
    },
    "name": "test_connection"
  }
}

Input Schema

NameRequiredDescriptionDefault
accountIdYesAccount id, as returned by list_accounts.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. First observed

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, openWorldHint=true and destructiveHint=false, and the description is consistent with that non-mutating profile. It adds real behavioral value by disclosing the per-protocol ok results and the errorCode with plain-language causes (wrong/expired app password, IMAP disabled, server unreachable). It does not say whether the two protocol checks run independently, whether a partial failure returns an error or a partial success, or anything about latency/timeouts for external server calls.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The important framing (what it tests, what it returns on failure, when to run it) is correctly front-loaded in the first three sentences. The remainder is a long, formulaic enumeration of seven account types each phrased as 'whether its X still opens/lists ...', which is repetitive and could be compressed to a single list with far less text.

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?

With no output schema, the description takes on the job of explaining returns and does so: ok per protocol and an errorCode with a human-readable cause. It also states scope (which account types are covered) and the diagnostic trigger. The remaining gap is failure granularity — whether a single errorCode covers all checks or one is returned per protocol — which matters for a multi-step connectivity probe.

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?

There is one parameter with 100% schema coverage, including a UUID pattern and 'Account id, as returned by list_accounts,' so the schema carries the semantics and the baseline of 3 applies. The description does add one genuinely useful constraint the schema lacks: the closed set of account types this tool accepts. It does not say what happens if an id of an unsupported type is passed.

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 opens with a concrete verb+resource: it tests a connected mailbox over IMAP (reading) and SMTP (drafting/sending), and then enumerates the other supported account types by their type key. That is far more specific than the title. It stops short of 5 because it never names a sibling (e.g. get_connection_help) to contrast against, so the boundary with the help tool is left implicit.

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 trigger: 'Diagnoses a mailbox that shows status ERROR in list_accounts or that mail tools fail to reach,' which ties the tool to a concrete diagnostic situation and references the sibling list_accounts. There is no stated when-not or named alternative for non-diagnostic cases, which keeps it below 5.

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