Skip to main content
Glama

unfour.db.get_saved_sql

unfour.db.get_saved_sql
Read-onlyIdempotent

Reads a saved SQL diagnostic projection with literals and sensitive constructs masked, so you can review query details safely; sqlRedacted flags any changes or truncation.

Instructions

Reads a saved SQL diagnostic projection. Literals and sensitive constructs are masked; sqlRedacted indicates changes or truncation. Never execute or save the masked projection as original SQL.

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": {
      "savedSqlId": "<savedSqlId>"
    },
    "name": "unfour.db.get_saved_sql"
  }
}

Input Schema

NameRequiredDescriptionDefault
savedSqlIdYes
workspaceIdNo

Output Schema

NameRequiredDescriptionDefault
savedSqlYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.15.0

TDQS

B3.3/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, but the description adds genuinely new behavior: literals and sensitive constructs are masked, and sqlRedacted signals modification or truncation of the returned SQL. The warning about not re-executing masked SQL is an important non-obvious caveat. It doesn't cover failure modes, such as what happens when savedSqlId is unknown.

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?

Two tight sentences with no filler, and the masking behavior leads ahead of the safety caveat. The second sentence ("indicates changes or truncation") is slightly compressed and requires a second read to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema present, return values don't need prose, but the two input parameters have zero documentation anywhere, and there is no guidance on when to call it. For a lookup tool with masking side-effects and workspace scoping, this leaves real gaps.

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?

Schema description coverage is 0%, and the description never mentions savedSqlId or workspaceId by name. It does reference the output field sqlRedacted, which clarifies return-value semantics, but the mandatory savedSqlId and the optional workspaceId scoping stay undocumented in both places.

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?

States a specific verb and resource: "Reads a saved SQL diagnostic projection." That distinguishes it from the save/delete/list saved-SQL siblings, though it never names them explicitly. An agent can tell what the tool fetches, but the word "diagnostic" alone doesn't fully explain what a "saved SQL" object contains.

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 a prohibitive instruction ("Never execute or save the masked projection as original SQL"), but no guidance on when to choose this over unfour.db.list_saved_sql, unfour.db.execute, or unfour.db.explain, and no prerequisites such as whether workspaceId is required for workspace-scoped lookups. Usage must be inferred from the name alone.

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