Skip to main content
Glama

rails_security_scan

Read-onlyIdempotent

Run Brakeman static security analysis on a Rails app to find vulnerabilities after code edits or before deployment, optionally filtering by files and confidence level.

Instructions

Run Brakeman static security analysis on Rails app. Use when: after editing controllers/models/views, reviewing code for vulnerabilities, or before deploying. Filter with files:["app/controllers/users_controller.rb"], set confidence:"high" to reduce noise.

Input Schema

NameRequiredDescriptionDefault
filesNoFile paths relative to Rails root to filter results (e.g. ['app/controllers/users_controller.rb']). Omit to scan entire app.
checksNoRun only specific checks by Brakeman class name (e.g. ['CheckSQL', 'CheckCrossSiteScripting']). Omit to run all checks.
detailNoDetail level. summary: counts only. standard: warnings with file/line (default). full: warnings with code snippets and remediation links.
confidenceNoMinimum confidence level for reported warnings. high: fewest results, most certain. weak: all warnings (default).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv5.39.1

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, closed-world, so the safety profile is covered. The description adds practical behavioral context: results can be narrowed with file filters and high confidence reduces noise, which helps an agent predict output volume. It stops short of describing runtime cost or the shape of results.

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?

Three short sentences with the core action first and the when-to-use and tuning guidance immediately after. No filler, and the most decision-relevant information is front-loaded.

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?

For a four-parameter, read-only scanning tool with no output schema, the description covers what it does, when to invoke it, and how to reduce result noise. Minor gaps remain around expected runtime and how findings are returned, but nothing essential for correct invocation is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and each of the four parameters is documented in detail, including enum meanings. The description's inline examples (files:["app/controllers/users_controller.rb"], confidence:"high" to reduce noise) mirror the schema examples rather than adding new semantics, so the baseline 3 applies.

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 and resource: 'Run Brakeman static security analysis on Rails app.' This clearly separates it from siblings such as rails_validate, rails_performance_check, and rails_review_changes without needing the schema.

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?

Explicitly names three triggering situations: after editing controllers/models/views, when reviewing code for vulnerabilities, and before deploying. It gives clear positive guidance but does not name alternatives or state when not to use it versus rails_validate or rails_performance_check.

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