{"id":149527,"target_id":"3d7516d9382e9f96","observed_at":"2026-11-18T19:19:13Z","from_subject":"sha256-ePxCwMOvhAPlsNhsA+eFed2PLoA0fCIKoIp34/PQzdE=","to_subject":"sha256-bEm27ujIayoSh9qiL6BxBCstCgGmzBLkWDgmMR6Pbu4=","from_toolset":"sha256-Tkc2TRug4KwuITUrRG73tE9yhIp9b//Hqn68awk7I7A=","to_toolset":"sha256-KwyRPH9I1UgLtxXkYRrNhJ/bX1g071lmJLEmhK+vrAs=","summary":{"added":[],"removed":[],"modified":[{"tool":"get_balance","fields":{"description":[["=","Shows how many scanned pages are left on the prepaid balance for this API key.\n\nUse when: before a batch of scans or photos, or when parse_invoice answered insufficient_balance and the remaining amount must be confirmed.\nDo not use when: the user asks about invoice content — that is get_result.\n\nSide effects and cost: none. The number comes from the same counter that blocks parsing, so it can change between two calls while a batch is running.\n\n"],["-","Parameters:"],["+","Parameter"],["="," "],["-","api_key"],["+","interactions and edge cases: this"],["="," is the "],["-","DueBuddy"],["+","same"],["="," "],["-","key;"],["+","counter"],["="," "],["-","optional"],["+","that"],["="," "],["-","when"],["+","blocks parsing, so a balance of zero makes"],["="," the "],["-","server"],["+","next"],["="," "],["-","was"],["+","parse_invoice"],["="," "],["-","added"],["+","fail"],["="," with "],["-","an"],["+","insufficient_balance"],["="," "],["-","X-Api-Key"],["+","and"],["="," "],["-","header."],["+","a topup_link is the only way forward. Two keys of one account see the same number, because usage is counted per account. The number can drop between two calls while a batch runs, and pages parsed on the free cabinet allowance are not part of it."],["=","\n\nReturns: {ok, balance} with remaining pages and the current plan."]]}},{"tool":"get_result","fields":{"description":[["=","Returns the result of a parse job started by parse_invoice: structured fields (supplier, invoice number, dates, net/VAT/gross, currency, line items) plus export links for accounting systems.\n\nUse when: you already have a job_id and want its status or its extracted data.\nDo not use when: you have no job_id yet — start with parse_invoice. Do not poll in a tight loop: one call every few seconds is enough, text PDFs and XML usually finish in under a minute.\n\nSide effects and cost: none. Does not touch the prepaid balance, so repeated polling is free; a failed job stays failed.\n\n"],["-","Parameters:"],["+","Parameter interactions and edge cases:"],["="," job_id "],["-","is"],["+","belongs to"],["="," the "],["-","identifier"],["+","key"],["="," "],["-","returned"],["+","that"],["="," "],["-","by"],["+","created it, so a job started with one key is invisible to another. A pasted URL or a document id from another system returns 404 rather than a guess. A job that failed stays failed — polling it again will not resurrect it; start a new"],["="," parse_invoice "],["-","for"],["+","call"],["="," "],["-","the same API key."],["+","instead."],["=","\n\nReturns: {ok, result}, where result.status is queued, processing, done or failed; on done it also carries fields and export links."]]}},{"tool":"parse_invoice","fields":{"description":[["=","Reads ONE incoming supplier invoice and returns a job id for polling.\n\nUse when: the user has a single invoice (PDF, photo, scan, XML e-invoice or QR bill) and wants supplier, invoice number, dates, amounts, VAT or line items extracted.\nDo not use when: the user asks to ISSUE an invoice, to send a payment, or to post entries into DATEV/1C — this tool only reads documents. For several documents call it once per document; the returned job ids can be polled independently.\n\nSide effects and cost: the document is downloaded and queued. XML and QR invoices are parsed by code and cost nothing; scans and photos cost 0.07 EUR per page, charged to the prepaid balance. Not idempotent: each call creates a new job and a new charge for scans.\n\n"],["-","Parameters:"],["+","Parameter"],["="," "],["-","file_url"],["+","interactions"],["="," "],["-","must"],["+","and"],["="," "],["-","be"],["+","edge cases: the same file parsed twice returns the existing job with charged=false instead of billing twice, so retrying after"],["="," a "],["-","public"],["+","client"],["="," "],["-","https"],["+","timeout"],["="," "],["-","link"],["+","is"],["="," "],["-","to"],["+","safe"],["="," "],["-","a"],["+","—"],["="," "],["-","single document on duebuddy.work (upload first via"],["+","and"],["="," the "],["-","cabinet);"],["+","second call's"],["="," country is "],["-","a two-letter code that selects"],["+","ignored,"],["="," the "],["-","parsing"],["+","first"],["="," profile "],["+","wins. Per API key there is a request rate limit "],["=","and"],["+"," a cap of 3 parses in flight; exceeding either returns 429 with Retry-After, which is a throttle, not a billing error. country"],["="," changes field names and tax "],["-","rules,"],["+","checks,"],["="," "],["-","not"],["+","never"],["="," the price."],["-"," api_key may be omitted when the server was added with an X-Api-Key header."],["=","\n\nReturns: {ok, job_id, status}. Next step: call get_result with that job_id."]]}},{"tool":"topup_link","fields":{"description":[["=","Returns the page where the prepaid balance can be topped up, plus the minimum amount.\n\nUse when: the balance is empty or too low for the documents the user wants to process.\nDo not use when: the balance is sufficient — check it with get_balance first.\n\nSide effects and cost: none. The call only builds a link; the payment happens in the browser and is handled by the payment provider, never by this server.\n\n"],["-","Parameters:"],["+","Parameter interactions and edge cases:"],["="," amount_eur is "],["-","informational"],["+","echoed"],["="," "],["-","only"],["+","back only; a value outside 8..5000 is rejected by parameter validation before the call runs. The returned url is a pricing page, not a payment link tied to a sum — the user chooses the amount there. Calling it repeatedly returns the same page"],["="," and "],["-","does"],["+","creates"],["="," "],["-","not"],["+","no"],["="," "],["-","create an order."],["+","orders."],["=","\n\nReturns: {ok, url, minimum_eur}."]]}}],"detail":"full","newAddresses":[],"newAddressesTotal":0},"label_id":"urn:uuid:4813c91b-c723-42df-85b0-ebdd256c1e3f","run_id":416768,"from_package_version":null,"to_package_version":null,"from_server_version":null,"to_server_version":null,"from_registry_version":"1.1.1","to_registry_version":"1.1.1","name":"work.duebuddy/invoices","endpoint":"https://duebuddy.work/mcp","title":null}