Skip to main content
Glama

db_mirror

Change this workspace's read-only platform-data mirror (views in schema dialogbrain_v1 of its own database, read with db.query). action=enable migrates the mirror schemas and takes a full snapshot (needs a database from db.create; admin/owner only). It is NOT idempotent: every call re-migrates and re-snapshots, so it is also how a failed mirror is recovered. The work runs in the background and the call returns at once with status 'snapshotting'; poll db.mirror_status until it is healthy. action=resync reconciles with the platform now (admin/owner, only when enabled and not snapshotting; also runs in the background). Example once healthy: db.query sql="SELECT id, title, last_message_preview FROM dialogbrain_v1.threads WHERE channel_account_id = AND last_message_is_outgoing = false".

Input Schema

NameRequiredDescriptionDefault
actionYesenable | resync
in_workspaceNoRun this one call in this workspace id instead of the session's. Nothing is stored; other sessions are not affected.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior4/5

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

Goes well beyond the annotations by disclosing non-idempotency (re-migrates and re-snapshots every call), the admin/owner authorization requirement, asynchronous execution returning immediately with status 'snapshotting', and resync preconditions. It does not state what a failed background migration leaves behind or error surfaces, which is the remaining gap.

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?

Front-loaded with the core statement and the enable path, with secondary details (non-idempotency, async, resync) in descending priority. The trailing worked SQL example is helpful but adds bulk that a shorter pointer to db.query could have covered.

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?

With no output schema, the description still tells the agent exactly what the call returns (immediate status 'snapshotting') and what to do next. Prerequisites, permissions, and a usage example cover everything needed to invoke it 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?

Schema coverage is 100%, so the baseline is 3, but the description meaningfully expands the `action` enum beyond 'enable | resync' by explaining each mode's effect, cost, and preconditions. The `in_workspace` scope parameter is only covered by the schema, not the description.

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?

States a specific verb+resource ('change this workspace's read-only platform-data mirror') and names the exact schemas/views affected (dialogbrain_v1), plus the two action modes. It clearly distinguishes itself from siblings db_mirror_status (polling), db_query (reading the mirror), and db_create (prerequisite).

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?

Explicit when-to-use for both modes: enable requires a database from db.create and admin/owner; resync only applies when enabled and not snapshotting. It also names the recovery scenario for a failed mirror and routes the agent to db_mirror_status for polling and db.query for consumption.

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.