Skip to main content
Glama
syrian963

django-chainsaw-mcp

by syrian963

delete_impact

Read-onlyIdempotent

Analyze Django model deletion impact without touching the database. Identify cascade-deleted rows, PROTECT-blocked relations, and fields set to NULL across the model graph.

Instructions

Show what deleting one row of a model would take with it.

Follows on_delete across the whole model graph: which models lose rows
through CASCADE, which PROTECT relations would block the delete, and which
fields get set to NULL. Reads the graph only, never the database.

Args:
    model_label: "app_label.ModelName", e.g. "shop.Customer".
    max_depth: how far to follow chained cascades.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
max_depthNo
model_labelYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.3

TDQS

A4.8/5.0
Behavior5/5

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

The description goes beyond the readOnlyHint and idempotentHint annotations by explicitly stating that it only reads the graph and never touches the database. It also discloses the specific behavior of following on_delete relations and how PROTECT relations can block deletion, which is valuable context for an agent deciding whether this is a safe analysis step.

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 well-structured: the purpose is stated in the first sentence, followed by concise explanatory detail and a clear Args section. Every sentence earns its place and there is no redundant or filler content.

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?

The description is complete for the tool's complexity. It covers both parameters with format and semantics, explains the tool's behavior, declares its read-only nature, and the presence of an output schema means return-value details are not required. An agent has all necessary information to invoke it correctly.

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?

With schema description coverage at 0%, the description carries the full burden of explaining parameters. It does so effectively by giving the exact model_label format ('app_label.ModelName') with an example, and by describing max_depth as controlling how far chained cascades are followed.

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 a specific verb and resource: it shows what deleting one row of a model would take with it, and clarifies that it follows on_delete relationships across the model graph. This makes its purpose distinct from generic model inspection or migration tools and clearly positions it as a delete-impact analysis tool.

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

Usage Guidelines4/5

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

The description provides clear context for when to use the tool: when assessing the cascading consequences of deleting a model row. It explains what the tool covers (CASCADE, PROTECT, SET_NULL) but does not explicitly name alternative sibling tools or state when not to use it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.