Skip to main content
Glama

Route Access Audit

route_access_audit

Audit Drupal route access control from *.routing.yml files to find routes with no restrictions, permissions, roles, or custom callbacks, and map controllers to declaring code.

Instructions

Classify every route's access control from *.routing.yml files.

The routing half of a pre-deployment review: each route is classified by what it requires — fully anonymous (access: TRUE), a permission, roles, entity access, a custom access callback, or nothing at all, which is the finding. Controllers are mapped to the file that declares the class when it can be found, so a risky route leads straight to code. Targets work like code_security_scan: one module by machine name, a DRUPAL_ROOT directory, or the site's own modules/ and themes/ by default.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNo
moduleNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.3.1

TDQS

A4.3/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full burden; it discloses the classification scheme, that an unprotected route is 'the finding', and that controllers are mapped back to declaring files. It implies a read-only audit but never states a safety/read-only guarantee or any permission requirements explicitly.

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?

Front-loads the core purpose in the first sentence and keeps the rest purposeful, though lines like 'so a risky route leads straight to code' are slightly stylistic. Overall tight and well-ordered 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?

An output schema exists, so return values need not be re-explained, and the description covers purpose, targeting, and classification semantics adequately. It is nearly complete for a two-parameter read tool, with only an explicit read-only statement missing.

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?

Schema description coverage is 0%, so the description must compensate, and it does: it explains that targets are a module by machine name, a DRUPAL_ROOT directory, or the site's own modules/themes by default, mapping naturally onto the 'module' and 'path' parameters including their default behavior.

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?

States a specific verb+resource ('Classify every route's access control from *.routing.yml files') and immediately frames its scope as 'the routing half of a pre-deployment review', which distinguishes it from config_security_check, permission_audit, and security_scan siblings. The classification taxonomy (anonymous, permission, roles, entity access, custom callback, or nothing) further pins down what it does.

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?

Gives clear context for when to use it (pre-deployment review) and explicitly explains targeting by analogy to code_security_scan (one module, a DRUPAL_ROOT directory, or default site modules/themes). It stops short of naming a when-not condition or an alternative tool to prefer in a given case, so it is context-rich but not exclusion-complete.

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

Deploy Server

Other Tools