Skip to main content
Glama

sqlserver-export-instance

Destructive

Exports a SQL Server instance's server-level metadata into a portable bundle for replay or verification on another instance, using stored credentials and a policy.

Instructions

dbabrain common.cli sqlserver-export-instance: An instance's server-level metadata exported, replayed or verified. server_id (or target) names the server; its connection or host login is completed from this node's inventory and encrypted secret store, so a request carries no password. Changes or removes something. A command on the emergency-operations list takes confirm: "yes" and a reason in its request, as on the command line. Request fields (pass them as request):

  • target: The machine or instance: a server_id, or <db_type> <ip>[:port].

  • credential_name: Which login in users.json; default: the instance's own.

  • output_dir: export: where the bundle goes.

  • bundle_dir: replay/verify: the bundle.

  • include: Which artifacts.

  • phase: pre-database | post-database | all.

  • overrides: Per-artifact choices.

  • secret_prefix: The ref prefix for secrets.

  • on_missing_secret: fail | skip.

  • on_unsupported: fail | skip.

  • dry_run: Plan only: change nothing.

  • confirm: The payload declares the operator agreed.

  • assume_yes: Unattended: take the typed yes as given.

  • authorized_by: Who approved it, for example {"channel": "telegram"}.

  • reason: Why, for the evidence.

  • connection: The database login, complete: db_type, host, port, username, password - and, where they apply, database, instance_name, service_name, sqlserver_driver, sqlserver_tls_verify and sql_access (the 8i bridge); server_id an...

  • policy: The content of sqlserver_instance_policy.json - which server settings are portable between instances. Required: an export or a replay with no policy is refused. The app that calls fills it from its own data/ (dbabrain...

  • secrets: {ref: value} for exactly the secret refs the bundle's manifest lists (secret_refs). A ref missing here is reported and the replay fails closed. The app that calls fills it from its own data/ (dbabrain.lib.data_sources...

  • rules: What the operation costs to confirm: {level, confirmations, challenge, effects} - the node's own emergency_operations.json entry for it. Absent, the ladder the package ships prices it; malformed, it is refused rather ...

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "sqlserver-export-instance"
  }
}

Input Schema

NameRequiredDescriptionDefault
requestNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.3/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, and the description corroborates with 'Changes or removes something,' then goes well beyond them by disclosing that a confirm 'yes' plus reason is required, that policy is mandatory and an export/replay without it is refused, and that missing secret refs make the replay fail closed. It also documents dry_run and assume_yes semantics. Only the truncated tail of the request-field list keeps it from a 5.

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 structure is reasonable — scope first, then prerequisites, then a bulleted field list — but the prose is noisy, carrying CLII implementation chatter about where the calling app fills data and where a ladder is priced, which an agent does not need. Multiple truncated sentences add length without adding meaning. It is dense rather than wasteful, but it is not front-loaded cleanly.

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?

For a destructive, open-world, single-blob-parameter tool, the description covers the gating concerns an agent must satisfy before calling: confirmation payload, evidence reason, mandatory policy, explicit secrets, and fail-closed behavior. An output schema exists, so return values need no explanation. The gaps are the truncated field definitions and the absence of any statement about how export differs from the sibling replay/verify tools.

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 schema is a single opaque `request` object with additionalProperties=true and 0% description coverage, so the description carries the entire burden and largely discharges it by enumerating and explaining target, credential_name, output_dir, bundle_dir, include, phase, overrides, secret_prefix, on_missing_secret, on_unsupported, dry_run, confirm, reason, policy, secrets and rules. The value added over the schema is large. It loses a point because several entries are cut off mid-sentence ('connection: ... server_id an...', 'policy: ... (dbabrain...'), leaving those fields partially specified.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a concrete resource (an instance's server-level metadata) and the operations export/replay/verify, so the domain is clear. But it conflates three operations into one tool while siblings named sqlserver-replay-instance and sqlserver-verify-instance exist, leaving the agent unsure whether this tool is the export path or a multi-mode entry point. The opening fragment is stated as a noun phrase rather than a clean verb-plus-resource sentence.

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

Usage Guidelines2/5

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

There is no explicit when-to-use guidance and no routing to the sibling replay/verify tools, so an agent given 'export or verify an instance's settings' cannot tell from this text which tool to call. The guidance present is conditional mechanics for confirm/reason on the emergency-operations list, which is a prerequisite rather than a use-case. Nothing states what this tool should not be used for.

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