Skip to main content
Glama
syrian963

django-chainsaw-mcp

by syrian963

explain_model

Read-onlyIdempotent

Run all Django model safety checks in one pass to reveal correlated risks invisible to single analyzers, such as unscoped ownership with permissive serialization.

Instructions

Everything known about one model, and the risks only visible combined.

Start here when meeting a model for the first time. It runs the structural,
ownership, deletion, signal, exposure, index and datetime checks and returns
one picture instead of seven reports.

The part worth reading is `correlated_risks`. Some defects exist only in the
overlap and no single analyser can see them: a model that is owned, read
without scoping, and serialised with fields = "__all__" is a complete path
from a URL to another customer's row, while each of those three alone is
just a warning.

Args:
    model_label: "app_label.ModelName".
    tenant_root: the model that owns data, for the ownership half.
    include_raw: attach the full report from each analyser as well.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
include_rawNo
model_labelYes
tenant_rootNoauth.User

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.3

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already establish read-only, idempotent, non-destructive behavior. The description adds meaningful behavioral context beyond that: it runs multiple analysis passes, returns a combined picture, and highlights correlated_risks as the key output. It also gives a concrete example of an interlocking defect, which helps the agent understand what the tool actually reveals.

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?

The description is well-structured with a clear opening, usage context, behavioral explanation, and a compact args list. The correlated_risks example is valuable but slightly verbose; still, every part contributes to correct understanding and invocation.

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?

For a read-only analysis tool with an output schema already present, this description is complete: it says what the tool does, when to start with it, why its output matters, and exactly what each parameter means. No critical information needed for selecting and invoking the tool is missing.

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?

Schema description coverage is 0%, so the description carries the full burden of explaining parameters. It does this well: model_label is given with format 'app_label.ModelName', tenant_root is explained as the owning model for the ownership half, and include_raw is described as attaching each analyser's full report. This goes beyond the raw schema types and defaults.

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 gives a specific purpose: aggregate all model checks into one picture, with correlated risks highlighted. It clearly distinguishes itself from the many single-purpose sibling tools by saying it runs structural, ownership, deletion, signal, exposure, index, and datetime checks instead of seven separate reports.

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?

It explicitly says 'Start here when meeting a model for the first time,' which is strong usage guidance. It implies the alternative is running individual analysis tools, but it does not name those siblings explicitly or state when NOT to use them.

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