Skip to main content
Glama

x402_lens_post_v1_document

Extracts structured JSON from document photos—receipts, lab reports, prescriptions—via a paid POST /v1/document call using an image URL or base64 and optional question.

Instructions

lens — Pay-per-call image understanding endpoints (inclusionAI LingSante 3.1 Air VL): food photo → nutrition/allergens/macros, product/medicine label OCR → structured JSON, medical photo description (not diagnosis), document extraction (receipts, lab reports, prescriptions), generic visual Q&A. Image via https URL or base64 data URI. $0.01/call on Base/Polygon/Arbitrum/World. [POST /v1/document] $0.01 USDC on eip155:8453+137+42161+480. Example: /v1/document — body: {image: 'https://…/receipt.jpg', question?}

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "x402_lens_post_v1_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
bodyNoJSON body for POST/PUT/PATCH/DELETE
queryNoQuery parameters, e.g. {base:'USD', quote:'EUR'}
restartNoExplicitly re-run a previously failed/unknown operation. Never set for unknown outcomes unless you know the paid call did not complete.
operationIdNoDurable operation id for this intent. Supply a stable id (e.g. your job/run id) to dedupe retries; omit to derive one from the arguments.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.1

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden, and it does disclose the most important traits: this is a paid call at $0.01 USDC on four specific chains, and input may be an https URL or base64 data URI. What it omits is failure and retry behavior — whether a retry re-charges, what happens on partial failure, and any rate limits — which matters for a metered endpoint; the restart/operationId semantics are left entirely to the schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The content is front-loaded and the example is useful, but a large share of the text is family-level boilerplate shared with every lens sibling, and the price is stated twice — once as '$0.01/call on Base/Polygon/Arbitrum/World' and again as '$0.01 USDC on eip155:8453+137+42161+480'. It reads as a marketing blurb rather than a tool specification, so several sentences do not earn their place for this specific endpoint.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Input format, endpoint and price are covered, but this is a paid extraction tool with no output schema, and the description never says what a document extraction returns — 'structured JSON' is attached only to the label use case, not to documents. For a metered call whose value depends on the returned fields, that leaves a meaningful gap.

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?

Schema coverage is 100%, so baseline would be 3, but the schema's body property is a generic additionalProperties bag; the description supplies the actual contract — body takes {image, question?} — and states that image is an https URL or base64 data URI. That is meaning the schema genuinely does not convey, lifting it above baseline, though it says nothing about the restart or operationId parameters beyond what is already documented.

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 names a concrete verb and resource — document extraction for receipts, lab reports and prescriptions via POST /v1/document — with a matching example body using receipt.jpg. It falls short of full sibling differentiation: the opening sentence is a family-level blurb listing food photos, labels, medical photos and generic VQA, so an agent must work out on its own that this tool is the document-specific one rather than x402_lens_post_v1_describe or _label.

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

Usage Guidelines3/5

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

Usage is only implied by the enumerated content types ('document extraction (receipts, lab reports, prescriptions)'), which lets an agent infer the right choice but never states it. There is no explicit when-to-use versus the four sibling lens endpoints, and no when-not guidance, so routing depends on inference from the content list.

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