Skip to main content
Glama

ai_invoice_extract

Extracts structured invoice data from Odoo attachments using AI vision. Routes to optimal model based on size, writes data back to account.move, and logs token usage and cost.

Instructions

Extract structured invoice data from an Odoo attachment via Anthropic Vision. Auto-routes to haiku/sonnet/opus based on pages+size. Writes extract_prefill_data back to account.move (if write_back). Logs usage to the billing ledger with token counts + cost in millicents.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
connectionNodefault
attachment_idYesir.attachment id
move_idNoaccount.move id (target for write-back). 0 = skip write-back.
sourceNoupload
source_message_idNoGmail Message-ID for dedup. Only used when source='gmail'.
model_overrideNoForce a specific model, bypassing routing. Leave empty for auto.
write_backNoWrite extracted data to account.move.extract_prefill_data.
tenant_tierNobusiness
Behavior4/5

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

With no annotations, the description carries full burden. It discloses auto-routing based on pages+size, write-back behavior, and billing logging. However, it omits what happens when write_back is false or error handling details.

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

Conciseness5/5

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

Three concise, front-loaded sentences with no fluff. Each sentence adds critical info: purpose, auto-routing, and side effects (write-back, logging).

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?

Missing output schema and description does not mention return value or error scenarios. Incomplete for a tool with no output schema, especially regarding behavior when write_back is false.

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 63%, so description should compensate for undocumented parameters. It explains write_back and auto-routing (related to model_override) but does not clarify connection, source, or tenant_tier. Baseline 3 is appropriate as description adds some but not full value.

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?

The description clearly states the tool extracts structured invoice data from an Odoo attachment using Anthropic Vision. This specific verb+resource combination distinguishes it from sibling tools like ai_invoice_pipeline_run or ai_invoice_scan_pending.

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 description implies usage through auto-routing and write-back behavior but lacks explicit guidance on when to use this tool versus alternatives like ai_invoice_pipeline_run. It does not mention prerequisites or excluded scenarios.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/rosenvladimirov/odoo-claude-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server