Read an invoice
parse_invoiceRead one text invoice into seller, tax ids, date, currency, and net, VAT, and gross amounts. Returns credits_remaining and fields. Amounts are digit strings, not numbers. Costs 0.15 credit only when text is extracted. A missing key, a missing file, or a PDF with no text layer (error no_text_extracted) is not charged. Send file_text when you already have the invoice text, or file_base64 for a text PDF, and set filename so .pdf is read as PDF and .txt as text. Do not send a photo or a scanned image-only PDF. vendor_name is the first line and can be wrong. Key: https://firm.bestsmartgoods.com/signup
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": "parse_invoice"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filename | No | Original file name with its extension. A name ending in .pdf is parsed as PDF. Any other name, or omitted, is treated as plain text. | |
| file_text | No | Plain invoice text. Send this or file_base64, not a photo. Preferred when the text is already extracted. | |
| file_base64 | No | Text PDF, or a .txt file, encoded as base64. Use this instead of file_text when you have the file bytes. Image-only PDFs fail with no_text_extracted and are not charged. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fields | Yes | ||
| credits_remaining | Yes | Balance after this successful call. |