Skip to main content
Glama

scan_for_vulnerabilities

Scan source code for security vulnerabilities such as hardcoded secrets, SQL injection, and XSS. Get findings with severity, confidence, taint flow, and a CVSS-inspired risk score to prioritize fixes.

Instructions

Scan code content for security vulnerabilities (SAST analysis).

Uses a 151-rule engine with taint-flow simulation and CVSS-inspired scoring. Detects hardcoded secrets, SQL injection, path traversal, command injection, insecure cryptography, unsafe deserialization, XSS, and authentication misconfigurations.

Args: content: The source code to scan. source: File path / identifier (used for language detection and confidence scoring). E.g. "auth/login.py".

Returns JSON with: - findings: [{rule_id, cwe, severity, line_number, description, fix, confidence, taint_flow}] - risk_score: CVSS-inspired aggregate [0.0, 10.0] - critical_count, high_count, medium_count, low_count - top_fix: most impactful remediation action

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceNounknown
contentYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.0.55
  2. Removedv1.0.54
  3. First observedv1.0.42

TDQS

A3.7/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 full behavioral disclosure burden. It meaningfully discloses the 151-rule engine, taint-flow simulation, CVSS-inspired scoring, and the specific vulnerability categories detected. It stops short of stating whether the operation is side-effect-free or describing authorization needs, but overall it offers substantial behavioral insight.

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?

The description is well-structured with front-loaded purpose, followed by engine details, parameter explanations, and a clear return-format breakdown. Every sentence earns its place, and the 'Args' and 'Returns JSON with' sections make it scannable for an agent.

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 two-parameter scan tool, the description covers input semantics and output structure thoroughly enough to invoke it correctly. Missing pieces include how it differs from the security_scan sibling and any operational caveats (e.g., content size, asynchronous behavior), but these are minor given the detail already present.

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. It defines 'content' as the source code to scan and explains 'source' as a file path/identifier used for language detection and confidence scoring, including an example. This adds real meaning beyond the plain schema types, though it could add constraints like size limits or supported languages.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool scans code content for security vulnerabilities via SAST analysis, enumerating specific vulnerability classes. It is specific about verb and resource, but does not differentiate itself from the sibling tool 'security_scan' or 'security_report', so it misses the top score for sibling distinction.

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

Usage Guidelines2/5

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

The description explains what the tool does but gives no guidance on when to use it versus alternatives. With siblings like security_scan and security_report present, the lack of explicit selection criteria or exclusions leaves an agent without decision support.

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