Skip to main content
Glama

scan_for_vulnerabilities

Scan source code for security vulnerabilities with SAST analysis. Detect hardcoded secrets, injection flaws, and misconfigurations, then get prioritized fixes and a CVSS-based risk score.

Instructions

Scan code content for security vulnerabilities (SAST analysis).

Uses a 55-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
Behavior4/5

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

Description discloses internal mechanism (55-rule engine, taint-flow simulation, CVSS scoring) and output structure. No annotations exist, so description carries full burden. It omits operational details like file size limits or authentication needs, but is largely transparent.

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?

Well-structured with bullet points, example, and front-loaded purpose. Slightly verbose in listing vulnerability types that are also reflected in findings structure, but overall efficient.

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?

Complete for a SAST tool: explains input parameters, internal engine, and full output schema (findings with rule details, risk score, counts, top fix). No missing critical information.

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 has 0% description coverage, but description adds meaning: 'content' is source code, 'source' is file path for language detection with an example. This fully compensates and goes beyond schema.

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?

Description clearly states the tool scans code for security vulnerabilities (SAST analysis) and lists specific vulnerability types (hardcoded secrets, SQL injection, etc.). This is a specific verb+resource combination that distinguishes it from siblings like 'security_scan' and 'compile_docs'.

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?

No guidance on when to use this tool vs alternatives. Sibling tools exist (e.g., 'security_scan', 'analyze_codebase_health') but the description does not differentiate usage contexts or provide when-not-to-use information.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/juyterman1000/entroly'

If you have feedback or need assistance with the MCP directory API, please join our Discord server