Skip to main content
Glama

extract_invoice

Extracts structured invoice fields from an invoice image using computer vision and OCR, returning parsed data without saving the file.

Instructions

Run computer vision + OCR on an invoice image and return structured fields WITHOUT saving.

Args: filename: image file name inside the inbox, e.g. "inv_001.png"

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": {
      "filename": "<filename>"
    },
    "name": "extract_invoice"
  }
}

Input Schema

NameRequiredDescriptionDefault
filenameYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/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 burden; it does disclose the crucial non-persisting behavior, which is real value. It says nothing about failure modes (missing file, unreadable image), processing latency, or the accuracy/confidence of the extracted fields.

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?

Two compact statements, front-loaded with the capability and its non-saving nature. The raw 'Args:' docstring block is slightly off-register but takes almost no space.

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?

The tool is simple (one required parameter, no nested objects), and the description covers invocation adequately. However, with no output schema the agent gets no hint of what 'structured fields' actually contains, so expectations of the return value remain undefined.

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 0%, so the description must compensate, and it does: it explains that filename is a name inside the inbox rather than an arbitrary path, and gives a concrete example ('inv_001.png').

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?

Names a specific operation (computer vision + OCR on an invoice image) and its output (structured fields), and the 'WITHOUT saving' clause draws the key line against a persistence-oriented sibling such as ingest_invoice.

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?

The 'WITHOUT saving' phrasing implies this is the non-mutating preview path, which helps an agent choose it over an ingest tool, but it never states when to prefer it (e.g. before ingesting) or what to do with the result.

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