Skip to main content
Glama

Semgrep SAST Scan

code_scan
Read-onlyIdempotent

Scan source code for security vulnerabilities like SQL injection and XSS using Semgrep. Get CWE-classified findings with severity levels to fix flaws early.

Instructions

Run SAST (Static Application Security Testing) on source code via Semgrep.

    Scans for security flaws: SQL injection, XSS, command injection,
    hardcoded credentials, insecure deserialization, path traversal, etc.
    Returns findings with CWE classifications and severity levels plus a
    typed ``findings``, ``clean``, ``skipped``, or ``failed`` status.

    Requires ``semgrep`` on PATH (``pip install semgrep``).
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesPath to source code directory to scan.
configNoSemgrep config. 'auto' = Semgrep Registry rules. Can be a path or registry string.auto

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Annotations already mark the tool as read-only, idempotent, and non-destructive. The description adds useful context beyond this: requires semgrep on PATH, returns typed statuses (findings, clean, skipped, failed), and scans for CWE-classified issues. No contradictions.

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 tightly written, with the main action front-loaded and each sentence providing useful info: purpose, vulnerability classes, return status, and a key prerequisite. No wasted words.

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?

Given the presence of an output schema and 100% parameter coverage, the description covers the essential aspects: what the tool does, what it returns (statuses), and a critical dependency. It is complete for guiding invocation.

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?

Both parameters (path and config) are fully described in the schema (100% coverage), so the description doesn't need to add parameter details. It does not significantly enrich parameter meaning beyond the schema, which is adequate.

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 it runs SAST via Semgrep on source code and lists specific vulnerability classes (SQL injection, XSS, etc.). It is specific in verb+resource but does not explicitly differentiate from sibling tools like 'scan' or 'check'.

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 implies usage for static security scanning of source code and mentions a prerequisite (semgrep on PATH), but it does not provide explicit when-to-use or exclusions relative to alternative tools.

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/msaad00/agent-bom'

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