Skip to main content
Glama

ingest_invoice

Extract invoice data from an image in the inbox, validate it against Saudi VAT rules, and save it to the database; invalid invoices are stored with a flag.

Instructions

Extract an invoice image and save it to the database. Invalid invoices are saved but flagged.

Args: filename: image file name inside the inbox

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": "ingest_invoice"
  }
}

Input Schema

NameRequiredDescriptionDefault
filenameYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/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 a genuinely useful non-obvious trait — invalid invoices are still saved but flagged — but says nothing about return values, idempotency, overwrite behavior, permissions, or what happens on extraction failure.

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?

The core action and the invalid-invoice behavior are front-loaded in two short sentences. The trailing Args block is slightly redundant in form but earns its place by adding the inbox location constraint.

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?

For a one-parameter ingestion tool with no output schema, the definition covers the action, the input location, and the invalid-input policy. It still leaves the agent guessing what the call returns and how to react to failures.

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 0%, so the description must compensate for the single parameter. It does add real meaning by specifying the filename refers to an image inside the inbox rather than an arbitrary path, but it gives no format or extension expectations.

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 specific verb and resource: extract an invoice image and persist it to the database. That is clearly distinct from read-only siblings like get_invoice or list_invoices, though it does not explicitly contrast with extract_invoice, which could sound similar.

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

Usage Guidelines2/5

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

It implies usage via 'image file name inside the inbox,' which tells the agent where files come from, but there is no statement of when to choose this over extract_invoice or query_invoices_sql, and no prerequisites or exclusions are given.

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