Skip to main content
Glama
vivashu27

SQL Injection MCP Server

by vivashu27

continue_batch

Retrieve the next batch of SQL injection scan results from a previously started batch. Use this after receiving 'has_more': true to continue scanning remaining URLs.

Instructions

Continue scanning remaining URLs from a previous batch. Use this when scan_urls_batch returns has_more=True.

Args: batch_id: Batch ID from a previous scan_urls_batch call

Returns: Next batch of scan results

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
batch_idYes

Implementation Reference

  • The continue_batch async function that handles continuing a batch scan. It retrieves the pending scan state from the pending_scans dict by batch_id, builds the remaining URLs, calls scan_urls_batch again with the stored parameters, and cleans up when no more URLs remain.
    async def continue_batch(batch_id: str) -> dict:
        """
        Continue scanning remaining URLs from a previous batch.
        Use this when scan_urls_batch returns has_more=True.
        
        Args:
            batch_id: Batch ID from a previous scan_urls_batch call
        
        Returns:
            Next batch of scan results
        """
        if batch_id not in pending_scans:
            return {"error": f"No pending scans for batch {batch_id}. Batch may be complete or expired."}
        
        pending = pending_scans[batch_id]
        remaining = pending["remaining_urls"]
        
        if not remaining:
            del pending_scans[batch_id]
            return {"message": "All URLs in this batch have been scanned", "batch_id": batch_id}
        
        # Build URL string for the next batch
        urls_str = "\n".join(remaining)
        
        # Scan next batch
        result = await scan_urls_batch(
            urls=urls_str,
            method=pending["method"],
            injection_types=pending["injection_types"],
            database_types=pending["database_types"],
            headers=pending["headers"],
            cookies=pending["cookies"],
            bearer_token=pending["bearer_token"],
            proxy_url=pending["proxy_url"],
            verify_ssl=pending["verify_ssl"],
            waf_bypass=pending["waf_bypass"],
            concurrency=pending["concurrency"],
            timeout=pending["timeout"],
            quick_mode=pending["quick_mode"],
            max_urls_per_batch=pending["max_urls_per_batch"]
        )
        
        # Update the original batch_id reference
        result["original_batch_id"] = batch_id
        
        # Clean up if complete
        if not result.get("has_more", False) and batch_id in pending_scans:
            del pending_scans[batch_id]
        
        return result
  • The @mcp.tool() decorator that registers continue_batch as an MCP tool on line 663, just before the function definition.
    @mcp.tool()
    async def continue_batch(batch_id: str) -> dict:
  • The pending_scans global dict that stores pending scan state (remaining URLs and parameters) for continuation by continue_batch.
    pending_scans: dict[str, dict] = {}
  • The code in scan_urls_batch that populates pending_scans with the remaining URLs and all parameters so continue_batch can pick them up later.
    if remaining_urls:
        pending_scans[batch_id] = {
            "remaining_urls": remaining_urls,
            "method": method,
            "injection_types": injection_types,
            "database_types": database_types,
            "headers": headers,
            "cookies": cookies,
            "bearer_token": bearer_token,
            "proxy_url": proxy_url,
            "verify_ssl": verify_ssl,
            "waf_bypass": waf_bypass,
            "concurrency": concurrency,
            "timeout": timeout,
            "quick_mode": quick_mode,
            "max_urls_per_batch": max_urls_per_batch,
            "all_results": []
        }
Behavior3/5

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

No annotations are present, so the description bears full responsibility for behavioral disclosure. It describes the return type but does not specify side effects, idempotency, or error handling (e.g., invalid batch_id).

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 two concise sentences plus an Args block, all relevant and necessary. No redundant information.

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?

For a simple continuation tool with one parameter, the description covers purpose, usage, parameter, and return value. No output schema is present but the return type is mentioned. Complete for the tool's complexity.

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?

The only parameter 'batch_id' is explained in the Args section as 'Batch ID from a previous scan_urls_batch call', adding meaningful context beyond the schema which only specifies type and requirement.

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 tool's purpose: 'Continue scanning remaining URLs from a previous batch.' It uses a specific verb and resource, and distinguishes from the 'scan_urls_batch' sibling which initiates a new batch.

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?

Explicit condition for use is provided: 'Use this when scan_urls_batch returns has_more=True.' This gives clear guidance, though alternative tools like 'get_batch_result' are not mentioned.

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