Skip to main content
Glama
vivashu27

SQL Injection MCP Server

by vivashu27

get_vulnerable_urls

Retrieve vulnerable URLs from a prior batch scan by specifying its batch ID, returning detailed results for SQL injection vulnerabilities.

Instructions

Get only the vulnerable URLs from a batch scan.

Args: batch_id: Batch ID from a previous batch scan

Returns: List of vulnerable URLs with their scan details

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
batch_idYes

Implementation Reference

  • The @mcp.tool() decorated function that implements the 'get_vulnerable_urls' tool. It filters batch scan results to return only URLs flagged as vulnerable.
    @mcp.tool()
    def get_vulnerable_urls(batch_id: str) -> dict:
        """
        Get only the vulnerable URLs from a batch scan.
        
        Args:
            batch_id: Batch ID from a previous batch scan
        
        Returns:
            List of vulnerable URLs with their scan details
        """
        if batch_id not in batch_results:
            return {"error": f"Batch ID {batch_id} not found"}
        
        batch = batch_results[batch_id]
        vulnerable = [r for r in batch["results"] if r.get("vulnerable", False)]
        
        return {
            "batch_id": batch_id,
            "total_scanned": batch["total_urls"],
            "vulnerable_count": len(vulnerable),
            "vulnerable_urls": vulnerable
        }
  • The @mcp.tool() decorator registers 'get_vulnerable_urls' as an MCP tool on the FastMCP server instance.
    @mcp.tool()
    def get_vulnerable_urls(batch_id: str) -> dict:
  • The 'batch_results' dictionary that stores batch scan results and is used by get_vulnerable_urls to retrieve and filter results.
    batch_results: dict[str, dict] = {}
Behavior3/5

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

No annotations provided; description carries burden. It indicates a read-only operation (get) returning a list, but lacks explicit safety notes (e.g., read-only, auth requirements). Not contradictory.

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, front-loaded with the main purpose. No unnecessary words; every sentence adds value.

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 simple retrieval tool with one parameter and no output schema, the description covers purpose, argument, and return type. Lacks detail on result structure and prerequisites, but adequate for basic use.

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 description adds context that batch_id is from a previous batch scan, which the schema lacks (coverage 0%). However, no format or constraints are explained.

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 'Get only the vulnerable URLs from a batch scan,' specifying the verb, resource, and source. It distinguishes from siblings like get_batch_result, though not explicitly.

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 implies use after a batch scan via the batch_id argument, but does not provide explicit when-to-use or alternatives. No guidance on when not to use this tool.

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