Skip to main content
Glama

analyze_impact

Preview the impact of DELETE, UPDATE, or DROP queries on a PostgreSQL database without executing them. Shows affected rows and rollback SQL to assess risk.

Instructions

Preview DELETE/UPDATE/DROP impact WITHOUT executing. Shows affected rows and rollback SQL.

LEVEL: Query (write operation preview - never executes)

USE FOR: previewing write impact, cascade effects, risk assessment. DO NOT USE FOR: reading data (execute_query), INSERT operations.

Examples: analyze_impact(query="DELETE FROM users WHERE status='inactive'", schema='public') analyze_impact(query="UPDATE orders SET status='cancelled' WHERE id=1", schema='shipment')

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSQL DELETE/UPDATE/DROP query to preview
sample_limitNoSample rows to show
timeout_msNoTimeout in ms (5 min default)
schemaNoSchema containing the table. REQUIRED. Use get_schema() to list available schemas.
formatNoOutput formatjson
urlNoDatabase URL

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Clearly states the tool does not execute (safe preview) and shows rollback SQL. No annotations are provided, so the description bears full burden. Could mention if it acquires locks or uses transactions, but current detail is strong.

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?

Well-structured with bullet points, examples, and a level note. Front-loaded main purpose. Every sentence adds value without redundancy.

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?

Covers key aspects: purpose, usage, examples. Output schema exists, so return values are documented elsewhere. Could mention prerequisite of a database connection, but that is implied by sibling tools.

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 coverage is 100%, so baseline is 3. Description does not add much beyond schema, but provides examples that demonstrate usage of 'query' and 'schema' parameters, which is helpful.

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 uses specific verbs ('preview', 'shows affected rows and rollback SQL') and clearly identifies the resource (DELETE/UPDATE/DROP impact). It distinguishes from siblings like execute_query by stating it does not execute.

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?

Explicitly states when to use ('previewing write impact, cascade effects, risk assessment') and when not to use ('reading data (execute_query), INSERT operations'), including an alternative tool name.

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/snss10/DBeast'

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