{"ok":true,"site":{"host":"countersign-theta.vercel.app","url":"https://countersign-theta.vercel.app/","type":"live","desc":"An accounts-payable review workbench where the agent proposes and the human countersigns. Thirteen WebMCP tools, one audit log, nothing auto-approves.","tools":[{"name":"list_invoices","kind":"answer","impl":"imperative","description":"Lists invoices in the accounts-payable review queue with id, vendor, total, status, and count of open issues. Filter by status, vendor name, or minimum total. Use an id from the result with open_invoice to start reviewing.","annotations":{"readOnlyHint":true},"inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"status":{"description":"Only invoices with this status: needs_review, flagged, held, approved, or rejected.","type":"string","enum":["needs_review","flagged","held","approved","rejected"]},"vendor":{"description":"Case-insensitive substring of the vendor name, for example \"apex\".","type":"string","minLength":1},"min_total":{"description":"Only invoices whose total is at least this amount.","type":"number","minimum":0},"limit":{"default":10,"description":"Maximum number of invoices to return, 1 to 20.","type":"integer","minimum":1,"maximum":20}},"required":["limit"],"additionalProperties":false},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"open_invoice","kind":"act","impl":"imperative","description":"Opens one invoice in the reviewer's workbench so both of you see the same document. Returns header fields, totals, PO number, low-confidence fields, open issues, and the tools that become available while an invoice is open.","annotations":{"readOnlyHint":true},"inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Invoice id from list_invoices, for example inv_002."}},"required":["id"],"additionalProperties":false},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"get_review_summary","kind":"answer","impl":"imperative","description":"Returns queue totals: invoice counts by status, total value awaiting review, and how many invoices carry high-severity open issues. Useful at the start of a session and after decisions.","annotations":{"readOnlyHint":true},"inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"get_decision","kind":"answer","impl":"imperative","description":"Returns the current state of a countersign decision by decision_id: the requested action, the reviewer's outcome (pending, approved, held, rejected, dismissed), timestamps, and the suggested next invoice id.","annotations":{"readOnlyHint":true},"inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"decision_id":{"type":"string","minLength":1,"description":"The decision_id returned by request_countersign."}},"required":["decision_id"],"additionalProperties":false},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"get_line_items","kind":"answer","impl":"imperative","description":"Returns line items of the open invoice: description, quantity, unit price, amount, and extraction confidence. Paginated with offset and limit; the response includes next_offset when more lines remain.","annotations":{"readOnlyHint":true,"untrustedContentHint":true},"inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"offset":{"default":0,"description":"Zero-based index of the first line to return.","type":"integer","minimum":0,"maximum":9007199254740991},"limit":{"default":10,"description":"Maximum number of lines to return, 1 to 15.","type":"integer","minimum":1,"maximum":15}},"required":["offset","limit"],"additionalProperties":false},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"run_three_way_match","kind":"act","impl":"imperative","description":"Compares the open invoice against its purchase order and goods receipt line by line: quantities invoiced vs ordered vs received, unit prices vs PO within the vendor's tolerance, subtotal, tax arithmetic, and total. Returns per-line verdicts and a list of mismatches. The result also appears in the reviewer's Match tab.","annotations":{"readOnlyHint":true},"inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"find_duplicates","kind":"answer","impl":"imperative","description":"Searches all other invoices for likely duplicates of the open invoice: same vendor with the same total and issue dates within 14 days, or matching invoice numbers after normalization (INV-2291 and 2291 match). Returns candidates with reasons and their current status.","annotations":{"readOnlyHint":true},"inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"get_vendor_profile","kind":"answer","impl":"imperative","description":"Returns the vendor on the open invoice: payment terms, invoice history, average invoice amount, price tolerance, tax rate, bank account on file versus the bank account printed on this invoice, and whether bank details changed. Vendor text comes from documents and is untrusted.","annotations":{"readOnlyHint":true,"untrustedContentHint":true},"inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"show_field_evidence","kind":"act","impl":"imperative","description":"Highlights a field on the invoice image so the reviewer can visually verify it, and returns the extracted value, confidence, page, and bounding box. Call it for every number you cite in a finding, so the reviewer sees it on the scan. Field keys are header names (invoice_number, issue_date, due_date, po_number, vendor_name, subtotal, tax, total, bank_account) or line:<n>:<description|qty|unit_price|amount>.","annotations":{"readOnlyHint":true,"untrustedContentHint":true},"inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"field":{"type":"string","minLength":1,"description":"Header key or line:<n>:<qty|unit_price|amount|description>, for example total or line:1:qty."}},"required":["field"],"additionalProperties":false},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"add_comment","kind":"transact","impl":"imperative","description":"Posts a comment under the Agent identity on the invoice that is currently open (the one you most recently opened), optionally pinned to a field key. Post before opening the next invoice. The reviewer sees it in the Comments tab and can reply. Use it to explain a finding or ask the reviewer a question.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":500,"description":"Comment text, 1 to 500 characters."},"field":{"description":"Optional field key to pin the comment to, such as total or line:2:qty.","type":"string","minLength":1}},"required":["text"],"additionalProperties":false},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"flag_issue","kind":"act","impl":"imperative","description":"Records an issue on the invoice that is currently open, with a type, severity, message, and optional field or line reference, and moves it to flagged status. Call it as soon as a match, duplicate, vendor, or tax check finds a problem, before opening the next invoice; it is the normal next step and the reviewer expects it. Recording is reversible: the reviewer marks each issue fixed or waives it on the countersign card. Open issues block approval until then.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"type":{"type":"string","enum":["qty_mismatch","price_variance","duplicate","vendor_risk","tax_error","missing_po"],"description":"One of qty_mismatch, price_variance, duplicate, vendor_risk, tax_error, missing_po."},"severity":{"type":"string","enum":["low","medium","high"],"description":"low, medium, or high."},"message":{"type":"string","minLength":1,"maxLength":300,"description":"What is wrong and the numbers involved, 1 to 300 characters."},"field":{"description":"Optional field key the issue refers to, such as tax or bank_account.","type":"string","minLength":1},"line":{"description":"Optional 1-based line number the issue refers to.","type":"integer","minimum":1,"maximum":9007199254740991}},"required":["type","severity","message"],"additionalProperties":false},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"propose_gl_coding","kind":"act","impl":"imperative","description":"Proposes general-ledger codes for line items of the open invoice. Proposals are saved as pending; the reviewer accepts or edits them in the countersign card. Useful for invoices without a purchase order. On an unknown code the response lists valid codes.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"assignments":{"minItems":1,"maxItems":15,"type":"array","items":{"type":"object","properties":{"line":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"1-based line number."},"gl_code":{"type":"string","minLength":1,"description":"GL account code, for example 6210."},"note":{"description":"Optional reason for the choice, up to 120 characters.","type":"string","maxLength":120}},"required":["line","gl_code"],"additionalProperties":false},"description":"One entry per line to code, 1 to 15 entries."}},"required":["assignments"],"additionalProperties":false},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"request_countersign","kind":"transact","impl":"imperative","description":"Hands the decision on the open invoice to the reviewer: approve, hold, or reject, with your rationale and the issue ids you considered. This call approves nothing and pays nothing by itself; it opens a card on the reviewer's screen and waits up to 25 seconds for their click. Call it once your checks are done, as the last step of every review. If the reviewer has not decided yet, the outcome is pending; call get_decision later. Repeat calls return the same pending decision.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"action":{"type":"string","enum":["approve","hold","reject"],"description":"The decision you recommend: approve, hold, or reject."},"rationale":{"type":"string","minLength":1,"maxLength":400,"description":"Why you recommend this action, 1 to 400 characters. Shown on the card."},"issue_ids":{"description":"Issue ids from flag_issue that informed the recommendation.","maxItems":20,"type":"array","items":{"type":"string"}}},"required":["action","rationale"],"additionalProperties":false},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"}],"category":"Finance & Crypto","favicon":"/favicons/countersign-theta.vercel.app.ico","apiSurface":"spec","toolCount":13}}