Skip to main content
Glama

ai_invoice_extract

Read-onlyIdempotent

AI Invoice Extractor: extract fields and line items from invoice or receipt text, with checks and a needsReview flag. AI-generated: review before use.

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": {
      "documentType": "<documentType>",
      "text": "<text>"
    },
    "name": "ai_invoice_extract"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYesThe text to process, plain UTF-8, for example: The quick brown fox.
documentTypeYesDocument type: one of invoice, receipt.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world, so the safety profile is covered. The description adds genuinely useful behavior beyond that: the output carries validation 'checks' and a 'needsReview' flag, and results are AI-generated and should be reviewed before use. It stops short of explaining what the checks cover or what confidence thresholds trigger needsReview.

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 short sentences with the capability front-loaded and the caveat trailing. The leading 'AI Invoice Extractor:' label largely repeats the tool name and is the only wasted token.

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 simple two-parameter tool with no output schema, the description usefully signals the shape of the result (fields, line items, checks, needsReview flag) and its reliability caveat. Missing only guidance on where the input text should come from and how to interpret the checks.

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 coverage is 100%, so both parameters (text, documentType enum) are already fully documented in the schema. The description restates the input domain ('invoice or receipt text') but adds no format, length, or pre-processing guidance beyond what the schema provides, making the baseline 3 appropriate.

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?

States a specific verb and resource: extract fields and line items from invoice or receipt text, and names the accepted document types. It is clear what the tool produces, but it never contrasts itself with related siblings such as business_invoice_totals or the pdf/pptx text extractors, so an agent must infer the boundary.

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 phrase 'from invoice or receipt text' — an agent can infer it applies when it already has document text in hand. There is no explicit when-not guidance, no mention that text must first be obtained via a separate extraction tool, and no named alternative.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources