Skip to main content
Glama

Document Liveness Detection (0.24 credits)

document_liveness
Read-onlyIdempotent

Detect whether a document image is a live capture rather than a screen or copy, so you can verify uploads before trusting an ID photo.

Instructions

Document liveness check. Returns whether the document image looks like a live capture rather than a screen or a copy, plus the checks that ran. Input: image as base64 or an https URL. Use it before trusting an uploaded ID photo. Use the OCR tools to read the text and face liveness for a selfie. Costs 0.24 credits per successful call.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "image": "<image>"
    },
    "name": "document_liveness"
  }
}

Input Schema

NameRequiredDescriptionDefault
imageYesDocument photo as a base64-encoded JPEG/PNG string (with or without a data:image/...;base64, prefix), or a public https:// image URL. Required.
saveImageNoWhen true, store the submitted image and return a URL.
validatePrintedCopyNoRun printed-copy detection.
documentValidationIdNoOptional link to an existing document-validation record.
validateScreenReplayNoRun screen-replay detection. At least one validation flag must be true.
validateDigitalManipulationNoRun digital-manipulation detection.
validatePortraitSubstitutionNoRun portrait-substitution detection.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.5

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already cover safety (readOnlyHint, idempotentHint, destructiveHint=false, openWorldHint), so the description's added value is the return shape (a live-capture verdict plus the checks that ran) and the per-call cost of 0.24 credits per successful call, which is real behavioral context not present in annotations. It stops short of saying how failures or rejected images are reported, which would be the final layer.

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?

Five short sentences, front-loaded with the verdict semantics before routing and cost. The opening 'Document liveness check' lightly echoes the tool name, but it functions as a header and costs almost nothing; otherwise there is no wasted wording.

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 read-only detection tool with no output schema and full schema coverage, the description supplies what the schema cannot: the meaning of the result, cost per successful call, and sibling routing. It could add a sentence on error/edge behavior (e.g., unreadable images) to be fully complete, but nothing needed to invoke it correctly is missing.

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?

Schema description coverage is 100%, so every parameter including the five validation flags and saveImage is already documented in structured form. The description only restates the input format (base64 or https URL) and adds nothing about what the validation flags mean or the constraint that at least one must be enabled. Baseline 3 is appropriate when the schema carries the parameter burden.

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?

States a specific verb and resource ('Document liveness check') and immediately defines the output semantics: whether the image looks like a live capture rather than a screen or copy. It explicitly separates itself from sibling capabilities by pointing to the OCR tools for reading text and face liveness for selfies.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an explicit usage rule ('Use it before trusting an uploaded ID photo') and names alternatives with the condition that selects them ('Use the OCR tools to read the text and face liveness for a selfie'). This is exactly the when/when-not/alternative structure that lets an agent choose without opening other schemas.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools