Skip to main content
Glama
vivashu27

SQL Injection MCP Server

by vivashu27

get_scan_result

Retrieve a specific SQL injection scan result by providing its scan ID to review previous vulnerability findings.

Instructions

Retrieve a previous scan result by ID.

Args: scan_id: Scan ID from a previous scan

Returns: Scan result details

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scan_idYes

Implementation Reference

  • The handler function that retrieves a previous scan result by ID from the in-memory scan_results dictionary. Registered as an MCP tool via @mcp.tool().
    @mcp.tool()
    def get_scan_result(scan_id: str) -> dict:
        """
        Retrieve a previous scan result by ID.
        
        Args:
            scan_id: Scan ID from a previous scan
        
        Returns:
            Scan result details
        """
        if scan_id in scan_results:
            return scan_results[scan_id].model_dump()
        return {"error": f"Scan ID {scan_id} not found"}
  • Registration of get_scan_result as an MCP tool via @mcp.tool() decorator on the FastMCP instance.
    @mcp.tool()
  • The ScanResult Pydantic model that defines the schema for scan results returned by get_scan_result.
    class ScanResult(BaseModel):
        """Result of a SQL injection scan."""
        scan_id: str = Field(..., description="Unique scan identifier")
        target_url: str = Field(..., description="Scanned URL")
        parameters_tested: list[str] = Field(default_factory=list, description="Parameters tested")
        payloads_tested: int = Field(default=0, description="Number of payloads tested")
        vulnerabilities: list[VulnerabilityFinding] = Field(default_factory=list, description="Found vulnerabilities")
        errors: list[str] = Field(default_factory=list, description="Errors during scan")
        duration_seconds: float = Field(default=0.0, description="Scan duration")
  • The in-memory dictionary that stores ScanResult objects, used by get_scan_result to look up results by scan_id.
    scan_results: dict[str, ScanResult] = {}
Behavior2/5

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

With no annotations provided, the description must fully disclose behavioral traits. It only states 'Retrieve' (implying a read operation) but does not specify what happens if scan_id is invalid, whether there are rate limits, or any side effects. This is insufficient for full transparency.

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?

The description is concise, with the first sentence stating the primary purpose. The docstring format adds some structure, though it repeats information already in the schema. No unnecessary sentences.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a single-parameter tool with no output schema, the description covers the basic purpose adequately. However, it lacks behavioral context and does not describe the return value in detail, leaving some gaps for the agent.

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?

The schema has 0% description coverage, so the description must compensate. The 'Args' section adds meaning by stating 'Scan ID from a previous scan', clarifying the source of the ID. However, it does not provide format constraints or examples, which would be helpful.

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?

The description clearly states the verb 'Retrieve' and resource 'previous scan result by ID', distinguishing it from sibling tools like continue_batch or get_batch_result which have different purposes. This makes the tool's purpose unambiguous.

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 is provided on when to use this tool versus alternatives such as get_batch_result or get_vulnerable_urls. The description only states the basic function, leaving the AI agent to infer usage context.

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/vivashu27/SQLinjector_MCP'

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