Skip to main content
Glama
questdb

mcp-server-questdb

Official

wait_for_pairing

Poll for pairing completion after credentials are shown. Returns status and permissions, and handles timeouts or bridge incompatibility warnings.

Instructions

Poll for completion of pairing started by get_pairing_credentials. PREREQUISITE: you have already written a message to the user containing the deep_link + ws_url + token from get_pairing_credentials's last response. If you have NOT yet shown those credentials, do that first — calling this tool without showing credentials only burns 50 s of polling while the user sees nothing actionable. Blocks for timeout_ms (default 50 s, max 50 s — sized to fit under typical MCP client tool-call timeouts). Returns {paired:true, consoleOrigin, permissions:{grantSchemaAccess,read,write}} on success, or {paired:false, reason:'timeout', retryCount, maxRetriesHint:10} on timeout — call again to keep waiting (up to ~10 retries / ~8 min) until the user pairs. If the bridge version doesn't match what the web console expects, the success payload includes a warning, a pre-rendered userMessage, and assistantNextActions; you MUST show the userMessage to the user verbatim AND suggest running the exact npx … upgrade command it contains (offer to run it for them) before proceeding. If pairing is refused outright for an incompatible bridge, the result is {paired:false, reason:'incompatible_bridge', userMessage, assistantNextActions} — show the userMessage verbatim and STOP polling; pairing cannot succeed until the user reinstalls the bridge version named in the message. permissions describes the user-granted MCP scopes: grantSchemaAccess=true allows schema introspection (tables/columns); read=true allows DQL (SELECT/SHOW); write=true additionally allows DDL/DML (CREATE/INSERT/UPDATE/DELETE/DROP/…). Operations outside the granted scope return PERMISSION_DENIED with a message naming the missing scope — adjust your plan accordingly rather than retrying.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
timeout_msNoOverride the default 50,000 ms poll length. Useful for tests.
Behavior5/5

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

With no annotations, the description carries full disclosure burden and does so thoroughly: it states the tool blocks for up to `timeout_ms`, describes success and timeout payloads, explains the `permissions` scopes, and details the incompatible-bridge flow including required user-facing messages. This goes far beyond minimal transparency.

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?

The description is long but every sentence adds necessary information about behavior, prerequisites, return values, or error handling. It is front-loaded with the core purpose and prerequisite, then systematically covers success, timeout, and incompatibility cases. No wasted words.

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?

Given no output schema and no annotations, the description must explain return values, error cases, and side effects. It covers all of these: success payloads, timeout retry semantics, permission-denied behavior, and incompatible-bridge instructions. It is complete enough for an agent to use this tool correctly without additional information.

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?

Although the schema already documents `timeout_ms` at 100% coverage, the description adds valuable context: it explains the default (50 s), the maximum (50 s), the polling behavior, and that it is sized to fit under typical MCP client timeouts. This enriches the parameter's meaning beyond the schema.

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: "Poll for completion of pairing started by `get_pairing_credentials`." This clearly differentiates it from the sibling `get_pairing_credentials`, which starts the pairing, while this tool waits for completion.

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

Usage Guidelines5/5

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

It states an explicit prerequisite (show credentials first), explains when to call again (on timeout), and when to stop (incompatible bridge). It also warns against calling without showing credentials because it 'only burns 50 s of polling while the user sees nothing actionable.'

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/questdb/mcp-server-questdb'

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