Skip to main content
Glama

get_scan_results

Fetch stored AI detection, plagiarism, readability, and SEO scan results using a scan ID to access complete analysis reports.

Instructions

Retrieve previously stored scan results by scan ID. Use this to fetch full results for scans that were stored (storeScan=true), or to check on scans that may have been processing when originally submitted.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scan_idYesThe scan ID (returned as 'id' in the original scan response).

Implementation Reference

  • Handler function that retrieves stored scan results by scan_id, validates the input, calls the client API, and formats the response using _format_full_result()
    async def handle_get_scan_results(
        arguments: dict[str, Any],
        client: OriginalityClient,
    ) -> list[TextContent]:
        """Retrieve stored scan results."""
        scan_id = arguments.get("scan_id", "")
        if not scan_id:
            return [TextContent(type="text", text="No scan_id provided.")]
    
        result = await client.get_scan_results(scan_id)
        return [TextContent(type="text", text=_format_full_result(result))]
  • Tool schema definition with name 'get_scan_results', description, and inputSchema requiring scan_id parameter
    Tool(
        name="get_scan_results",
        description=(
            "Retrieve previously stored scan results by scan ID. Use this to fetch "
            "full results for scans that were stored (storeScan=true), or to check "
            "on scans that may have been processing when originally submitted."
        ),
        inputSchema={
            "type": "object",
            "properties": {
                "scan_id": {
                    "type": "string",
                    "description": "The scan ID (returned as 'id' in the original scan response).",
                },
            },
            "required": ["scan_id"],
        },
    ),
  • Registration mapping tool name 'get_scan_results' to its handler function handle_get_scan_results
    TOOL_HANDLERS = {
        "scan_ai": handle_scan_ai,
        "scan_full": handle_scan_full,
        "scan_plagiarism": handle_scan_plagiarism,
        "scan_readability": handle_scan_readability,
        "scan_seo": handle_scan_seo,
        "scan_url": handle_scan_url,
        "get_scan_results": handle_get_scan_results,
        "credit_balance": handle_credit_balance,
    }
  • Client method that makes the actual HTTP GET request to /scan-results endpoint with scan_id parameter
    async def get_scan_results(self, scan_id: str) -> dict[str, Any]:
        """Retrieve stored scan results by ID."""
        resp = await self.client.get("/scan-results", params={"id": scan_id})
        resp.raise_for_status()
        return resp.json()

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/EfrainTorres/armavita-originality-ai-mcp'

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