Skip to main content
Glama
syrian963

django-chainsaw-mcp

by syrian963

amplification

Read-onlyIdempotent

Scan Django projects to locate code patterns that amplify database queries per request, including N+1 queries and unbounded list fetching, revealing potential denial-of-service risks.

Instructions

Endpoints anyone can call that cost a great deal to answer.

Two facts, each of which is somebody else's finding and neither of which
is wrong alone:

    GET /orders has no authentication.
    GET /orders issues about 2852 queries per request.

The first is right on a public catalogue. The second, behind a login, is a
backlog item. Together they are one request, from anyone, that costs the
database three thousand queries - and every one of them returns 200, so
nothing in the logs looks like an attack.

The other half is the unbounded list: public, unpaginated, and therefore
the whole table in one request. That is not load, it is exfiltration.

The tools that look for this are DAST scanners; they need the service
running, reachable and holding enough rows for the cost to show. All of it
is in the source. Works on Django (DRF views) and FastAPI.

Args:
    search_path: directory to scan. Defaults to the configured project.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
search_pathNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.3

TDQS

B3.4/5.0
Behavior4/5

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

Beyond the readOnly/idempotent/destructive annotations, the description discloses that the analysis is source-based, works on Django (DRF) and FastAPI, and scans a directory. This adds useful operational context, although it could be clearer that this tool itself is not a live DAST scanner.

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 description uses a narrative, examples-heavy style rather than a front-loaded imperative, and it takes several sentences before connecting to the tool's own behavior. Most sentences contribute context, but they could be tightened.

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

Completeness3/5

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

It covers the search path input, supported frameworks, and the vulnerability class, and an output schema exists to explain return values. However, the lack of an explicit statement of what the tool returns/detects and how unsupported projects are handled leaves moderate gaps.

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 only provides a nullable string with a default and no description, so the Args line adds real semantic value: search_path is the directory to scan and defaults to the configured project. Complete for a single optional parameter.

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 defines the amplification concept (endpoints anyone can call that cost a great deal) and implies a source scan via search_path, but never states an explicit verb like 'find' or 'scan for amplification vulnerabilities.' It is distinguishable by topic but not clearly articulated as a tool operation.

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

Usage Guidelines3/5

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

The mention of DAST scanners needing a running service while 'all of it is in the source' implies this tool is a source-based alternative, but the description does not state when to choose amplification over sibling tools such as open_endpoints or endpoint_cost. The guidance is implicit rather than explicit.

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