Skip to main content
Glama
syrian963

django-chainsaw-mcp

by syrian963

open_endpoints

Read-onlyIdempotent

Identify publicly accessible Django REST Framework endpoints whose serializers expose sensitive fields, helping detect potential data leaks.

Instructions

Endpoints anyone can call, crossed with what their serializer exposes.

serializer_exposure knows CustomerExportSerializer leaks a password reset
token; a Semgrep rule knows a view has AllowAny. Each alone is a judgement
call - maybe the serializer only feeds an admin export, maybe the view
serves a catalogue. Together there is nothing left to judge, and neither
check can make the connection alone.

DRF's own default permission is AllowAny. A project that never configured
DEFAULT_PERMISSION_CLASSES has every view without explicit
permission_classes open, and none of them say so; that is volunteered
first. Views overriding get_permissions() are listed, not judged.

Args:
    include_unbounded: also report open endpoints whose serializer uses
        fields="__all__" or exclude, even with nothing sensitive on the
        model today. The next migration decides what leaks.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
include_unboundedNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.3

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already mark the tool as read-only and idempotent, and the description adds meaningful behavioral detail: it voluntarily surfaces default AllowAny views, lists but does not judge get_permissions() overrides, and explains how include_unbounded handles unbounded serializers.

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 purpose is front-loaded and the argument semantics are clearly separated, but the middle narrative about judgement calls is somewhat longer than necessary. Still, it earns its place by justifying the tool's existence and behavior.

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?

With only one optional parameter, an output schema present, and annotations covering safety, the description covers all essential context: what is reported, what is deliberately not judged, when to use the flag, and why the tool matters.

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 for include_unbounded. It explains exactly what the flag does, including the fields='__all__' or exclude condition and the reason it matters for future migrations.

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 first sentence names a concrete resource ('endpoints anyone can call') and the specific analytical lens ('crossed with what their serializer exposes'). It also distinguishes the tool from the standalone serializer_exposure and Semgrep AllowAny checks, making the unique value obvious.

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 explains why this tool is needed when either signal alone is inconclusive, and it highlights DRF's AllowAny default as a critical context for when the tool is useful. It stops short of explicitly naming sibling alternatives or stating 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.