Skip to main content
Glama
scamverifyai

ScamVerify

check_document

Read-onlyIdempotent

Analyze document images to detect scam indicators by extracting entities and verifying them against government databases. Upload photos of suspicious letters, notices, or invoices for risk assessment.

Instructions

Analyze a document image for scam indicators. Upload a photo of a suspicious letter, court notice, receipt, invoice, or other document. Uses vision AI to extract entities (addresses, officials, citations, phone numbers) and verifies them against government databases. Returns risk score, verdict, red flags, and entity verification results.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
image_urlNoURL of the document image to analyze (provide either image_url or image_base64)
image_base64NoBase64-encoded image data (provide either image_url or image_base64). Include the data URI prefix (e.g. data:image/jpeg;base64,...) or raw base64.

Implementation Reference

  • The `check_document` tool is defined and registered using `server.tool`. It handles image document analysis by resolving the input image (either URL or Base64) and sending it via a multipart request to the `/api/v1/document/analyze` endpoint.
    server.tool(
      'check_document',
      'Analyze a document image for scam indicators. Upload a photo of a suspicious letter, court notice, receipt, invoice, or other document. Uses vision AI to extract entities (addresses, officials, citations, phone numbers) and verifies them against government databases. Returns risk score, verdict, red flags, and entity verification results.',
      {
        image_url: z.string().optional().describe('URL of the document image to analyze (provide either image_url or image_base64)'),
        image_base64: z.string().optional().describe('Base64-encoded image data (provide either image_url or image_base64). Include the data URI prefix (e.g. data:image/jpeg;base64,...) or raw base64.'),
      },
      {
        title: 'Analyze Document',
        readOnlyHint: true,
        destructiveHint: false,
        idempotentHint: true,
        openWorldHint: true,
      },
      async ({ image_url, image_base64 }) => {
        try {
          const { buffer, mimeType, fileName } = await resolveImage(image_url, image_base64);
          const data = await apiMultipart('/api/v1/document/analyze', buffer, mimeType, fileName);
          return jsonResult(data);
        } catch (err) {
          return errorResult(err instanceof Error ? err.message : 'Document analysis failed');
        }
      },
    );
Behavior4/5

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

While annotations declare readOnly/idempotent status, the description adds valuable operational context: 'Uses vision AI to extract entities' and 'verifies them against government databases'. Crucially, it compensates for the missing output schema by disclosing return values: 'risk score, verdict, red flags, and entity verification results'.

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?

Four well-structured sentences cover purpose, input examples, processing behavior, and output format. Every sentence earns its place with zero redundancy. Information is front-loaded with the core action ('Analyze a document image') followed by specific examples and technical details.

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 complexity (vision AI extraction, government DB verification) and lack of output schema, the description provides adequate disclosure of return structure and behavioral traits. The annotations cover safety properties (readOnly/destructive hints), while the description handles functional behavior, creating a complete picture.

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?

With 100% schema description coverage, the schema already fully documents both image_url and image_base64 parameters (including the mutual exclusivity note). The description mentions 'Upload a photo' which aligns with the parameters, but adds no additional syntax, format constraints, or semantic details beyond the schema.

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 opens with a specific verb ('Analyze') and resource ('document image'), clearly targeting 'scam indicators'. It effectively distinguishes from siblings (check_email, check_phone, check_text) by specifying document types: 'letter, court notice, receipt, invoice'.

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?

Provides clear context on when to use ('Upload a photo of a suspicious letter...'), implicitly guiding users toward image-based document analysis. However, it lacks explicit guidance on when NOT to use (e.g., 'use check_text for plain text scams') or direct comparison to sibling 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/scamverifyai/scamverify-mcp'

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