Skip to main content
Glama

test_connection

Read-only

Test if a configured MCP server starts and responds correctly by spawning the process, connecting via stdio, and verifying tool listing. Use after configuring a server or when health check fails.

Instructions

Test that a single configured MCP server starts and responds correctly.

Spawns the server process, connects via MCP stdio protocol, calls list_tools() to verify it responds, then shuts it down cleanly.

Use this to verify a specific server after configure_server, or to debug a server that check_health reported as unhealthy.

Args: server_name: Exact name of the server as it appears in the config. Use list_installed to see available names. client: Which MCP client's config to read from. One of "claude_desktop", "claude_code", "cursor", "windsurf". Auto-detects if empty. timeout_seconds: Max seconds to wait for a response (clamped to 5-60). Default 15. Increase for slow-starting servers. auto_heal: When True, if the test fails, attempt to diagnose the error, apply an automatic fix, and retry. Returns healing details alongside the test result.

Returns: Test result with success status, discovered tool names, or error message explaining what went wrong. If auto_heal is True and healing was attempted, includes a "healing" key with diagnosis and fix details.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
server_nameYes
clientNo
timeout_secondsNo
auto_healNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

The description details the full behavioral lifecycle: spawns the server process, connects via MCP stdio, calls list_tools(), then shuts down cleanly. It also covers the auto_heal feature's behavior (attempt diagnosis, apply fix, retry). This goes well beyond the readOnlyHint annotation, providing transparency about what the tool does internally.

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?

The description is well-structured: a summary sentence, step-by-step behavioral explanation, usage context, and parameter explanations. It is slightly lengthy but every sentence adds value. It could be trimmed slightly, but overall it's efficiently organized.

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?

Given the presence of an output schema (implied by context), the description covers the tool's purpose, parameters, behavior, and return value (success status, tool names, error message, optional healing details). It is comprehensive enough for an agent to decide when and how to use it, though it could mention that the test only checks the list_tools response, not full functionality.

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

Parameters5/5

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

Despite 0% schema description coverage, the description explains all four parameters in a dedicated 'Args' block. It adds context like server_name must match config exactly, client values are listed, timeout is clamped to 5-60, and auto_heal returns healing details. This fully compensates for the schema's lack of descriptions.

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 clearly states the tool tests a single configured MCP server, using specific verbs ('test', 'verify', 'debug') and identifies the resource ('MCP server'). It distinguishes from siblings by mentioning specific use cases like after configure_server or when check_health is unhealthy, making the purpose unique and unambiguous.

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?

The description explicitly tells when to use the tool: 'after configure_server, or to debug a server that check_health reported as unhealthy.' It also provides parameter-level hints (e.g., auto_heal for automatic fixes). However, it does not explicitly exclude alternatives like inspect_server or list_installed, so it misses some direct comparisons.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/felipestenzel/mcp-tap'

If you have feedback or need assistance with the MCP directory API, please join our Discord server