{"serverInfo":{"name":"ap-control-labs-finance-controls","title":"AP Control Labs Finance Controls","version":"1.1.0"},"authentication":{"required":true,"schemes":["bearer"],"instructions":"Create an API key in the AP Control workspace and send it as Authorization: Bearer <key>."},"tools":[{"name":"analyze_invoice","description":"Submit one normalized invoice for asynchronous duplicate analysis. Use the returned ID to poll; do not resubmit the same work with a new idempotency key.","inputSchema":{"type":"object","additionalProperties":false,"properties":{"invoice":{"type":"object","additionalProperties":false,"properties":{"vendor_name":{"type":"string","minLength":1,"maxLength":250},"invoice_number":{"type":["string","null"],"maxLength":120},"invoice_date":{"type":["string","null"],"format":"date"},"due_date":{"type":["string","null"],"format":"date"},"currency":{"type":"string","pattern":"^[A-Za-z]{3}$"},"total":{"type":["string","number"],"exclusiveMinimum":0},"line_items":{"type":"array","maxItems":500},"document_sha256":{"type":["string","null"],"pattern":"^[a-fA-F0-9]{64}$"}},"required":["vendor_name","total"]},"idempotency_key":{"type":"string","minLength":8,"maxLength":255}},"required":["invoice","idempotency_key"]},"outputSchema":{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["QUEUED","PROCESSING","COMPLETED","FAILED"]},"decision":{"enum":["CLEAR","REVIEW_REQUIRED","BLOCKED",null]},"exceptions":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"severity":{"enum":["LOW","MEDIUM","HIGH","CRITICAL"]},"message":{"type":"string"},"suggested_next_action":{"type":"string"},"evidence":{"type":"object"}},"required":["code","severity","message","suggested_next_action"]}}},"required":["id","status","exceptions"]}},{"name":"get_invoice_status","description":"Retrieve one analysis owned by the caller's organization. Poll until status is COMPLETED or FAILED.","inputSchema":{"type":"object","additionalProperties":false,"properties":{"invoice_id":{"type":"string","minLength":1}},"required":["invoice_id"]},"outputSchema":{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["QUEUED","PROCESSING","COMPLETED","FAILED"]},"decision":{"enum":["CLEAR","REVIEW_REQUIRED","BLOCKED",null]},"exceptions":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"severity":{"enum":["LOW","MEDIUM","HIGH","CRITICAL"]},"message":{"type":"string"},"suggested_next_action":{"type":"string"},"evidence":{"type":"object"}},"required":["code","severity","message","suggested_next_action"]}}},"required":["id","status","exceptions"]}},{"name":"get_invoice_exceptions","description":"Retrieve the agent-readable exception packet for one caller-owned invoice.","inputSchema":{"type":"object","additionalProperties":false,"properties":{"invoice_id":{"type":"string","minLength":1}},"required":["invoice_id"]},"outputSchema":{"type":"object","properties":{"exceptions":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"severity":{"enum":["LOW","MEDIUM","HIGH","CRITICAL"]},"message":{"type":"string"},"suggested_next_action":{"type":"string"},"evidence":{"type":"object"}},"required":["code","severity","message","suggested_next_action"]}}},"required":["exceptions"]}},{"name":"create_purchase_order","description":"Register one customer-provided purchase order as the baseline for AP Match. This stores only the caller's data and never writes to an ERP.","inputSchema":{"type":"object","additionalProperties":false,"properties":{"po_number":{"type":"string","minLength":1,"maxLength":120},"vendor_name":{"type":"string","minLength":1,"maxLength":250},"currency":{"type":"string","pattern":"^[A-Za-z]{3}$"},"lines":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"sku":{"type":["string","null"],"maxLength":120},"description":{"type":["string","null"],"maxLength":500},"quantity":{"type":["string","number"],"exclusiveMinimum":0},"unit_price":{"type":["string","number"],"minimum":0}},"required":["quantity","unit_price"]},"minItems":1,"maxItems":500}},"required":["po_number","vendor_name","lines"]},"outputSchema":{"type":"object","properties":{"id":{"type":"string"},"po_number":{"type":"string"},"status":{"type":"string"},"lines":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"sku":{"type":["string","null"],"maxLength":120},"description":{"type":["string","null"],"maxLength":500},"quantity":{"type":["string","number"],"exclusiveMinimum":0},"unit_price":{"type":["string","number"],"minimum":0}},"required":["quantity","unit_price"]}}},"required":["id","po_number","status","lines"]}},{"name":"record_receipt","description":"Record a customer-provided goods receipt for a registered purchase order. Use it before a THREE_WAY AP Match; it never updates a warehouse or ERP.","inputSchema":{"type":"object","additionalProperties":false,"properties":{"purchase_order_id":{"type":"string","minLength":1},"receipt_number":{"type":"string","minLength":1,"maxLength":120},"lines":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"sku":{"type":["string","null"],"maxLength":120},"description":{"type":["string","null"],"maxLength":500},"quantity":{"type":["string","number"],"exclusiveMinimum":0},"unit_price":{"type":["string","number"],"minimum":0}},"required":["quantity","unit_price"]},"minItems":1,"maxItems":500},"received_at":{"type":["string","null"],"format":"date-time"}},"required":["purchase_order_id","receipt_number","lines"]},"outputSchema":{"type":"object","properties":{"id":{"type":"string"},"purchase_order_id":{"type":"string"},"receipt_number":{"type":"string"},"lines":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"sku":{"type":["string","null"],"maxLength":120},"description":{"type":["string","null"],"maxLength":500},"quantity":{"type":["string","number"],"exclusiveMinimum":0},"unit_price":{"type":["string","number"],"minimum":0}},"required":["quantity","unit_price"]}}},"required":["id","purchase_order_id","receipt_number","lines"]}},{"name":"match_invoice","description":"Run a read-only two- or three-way match against one registered purchase order. Supply exactly one purchase-order identifier.","inputSchema":{"type":"object","additionalProperties":false,"properties":{"invoice_id":{"type":"string","minLength":1},"purchase_order_id":{"type":"string","minLength":1},"purchase_order_number":{"type":"string","minLength":1},"mode":{"enum":["TWO_WAY","THREE_WAY"]}},"required":["invoice_id"],"oneOf":[{"required":["purchase_order_id"]},{"required":["purchase_order_number"]}]},"outputSchema":{"type":"object","properties":{"invoice_id":{"type":"string"},"purchase_order_id":{"type":"string"},"mode":{"enum":["TWO_WAY","THREE_WAY"]},"decision":{"enum":["CLEAR","REVIEW_REQUIRED","BLOCKED"]},"line_results":{"type":"array"},"exceptions":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"severity":{"enum":["LOW","MEDIUM","HIGH","CRITICAL"]},"message":{"type":"string"},"suggested_next_action":{"type":"string"},"evidence":{"type":"object"}},"required":["code","severity","message","suggested_next_action"]}}},"required":["invoice_id","purchase_order_id","mode","decision","line_results","exceptions"]}},{"name":"get_invoice_extraction","description":"Retrieve canonical fields, OCR confidence, source evidence, and a next action for a submitted invoice.","inputSchema":{"type":"object","additionalProperties":false,"properties":{"invoice_id":{"type":"string","minLength":1}},"required":["invoice_id"]},"outputSchema":{"type":"object","properties":{"invoice_id":{"type":"string"},"status":{"enum":["QUEUED","PROCESSING","COMPLETED","FAILED"]},"fields":{"anyOf":[{"type":"object","additionalProperties":false,"properties":{"vendor_name":{"type":"string","minLength":1,"maxLength":250},"invoice_number":{"type":["string","null"],"maxLength":120},"invoice_date":{"type":["string","null"],"format":"date"},"due_date":{"type":["string","null"],"format":"date"},"currency":{"type":"string","pattern":"^[A-Za-z]{3}$"},"total":{"type":["string","number"],"exclusiveMinimum":0},"line_items":{"type":"array","maxItems":500},"document_sha256":{"type":["string","null"],"pattern":"^[a-fA-F0-9]{64}$"}},"required":["vendor_name","total"]},{"type":"null"}]},"confidence":{"type":["number","null"]},"evidence":{"type":"object"},"next_action":{"type":"string"}},"required":["invoice_id","status","next_action"]}},{"name":"validate_invoice","description":"Run deterministic required-field, date, and line-total checks before AP routing. This does not create or alter accounting records.","inputSchema":{"type":"object","additionalProperties":false,"properties":{"invoice":{"type":"object","additionalProperties":false,"properties":{"vendor_name":{"type":"string","minLength":1,"maxLength":250},"invoice_number":{"type":["string","null"],"maxLength":120},"invoice_date":{"type":["string","null"],"format":"date"},"due_date":{"type":["string","null"],"format":"date"},"currency":{"type":"string","pattern":"^[A-Za-z]{3}$"},"total":{"type":["string","number"],"exclusiveMinimum":0},"line_items":{"type":"array","maxItems":500},"document_sha256":{"type":["string","null"],"pattern":"^[a-fA-F0-9]{64}$"}},"required":["vendor_name","total"]}},"required":["invoice"]},"outputSchema":{"type":"object","properties":{"decision":{"enum":["CLEAR","REVIEW_REQUIRED"]},"exceptions":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"severity":{"enum":["LOW","MEDIUM","HIGH","CRITICAL"]},"message":{"type":"string"},"suggested_next_action":{"type":"string"},"evidence":{"type":"object"}},"required":["code","severity","message","suggested_next_action"]}},"next_action":{"type":"string"}},"required":["decision","exceptions","next_action"]}},{"name":"search_invoice_history","description":"Find exact and near matches in the caller's own completed invoice history. Scores are explainable, not a fraud probability.","inputSchema":{"type":"object","additionalProperties":false,"properties":{"invoice":{"type":"object","additionalProperties":false,"properties":{"vendor_name":{"type":"string","minLength":1,"maxLength":250},"invoice_number":{"type":["string","null"],"maxLength":120},"invoice_date":{"type":["string","null"],"format":"date"},"due_date":{"type":["string","null"],"format":"date"},"currency":{"type":"string","pattern":"^[A-Za-z]{3}$"},"total":{"type":["string","number"],"exclusiveMinimum":0},"line_items":{"type":"array","maxItems":500},"document_sha256":{"type":["string","null"],"pattern":"^[a-fA-F0-9]{64}$"}},"required":["vendor_name","total"]},"limit":{"type":"integer","minimum":1,"maximum":20}},"required":["invoice"]},"outputSchema":{"type":"object","properties":{"matches":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string"},"score":{"type":"number","minimum":0,"maximum":1},"basis":{"type":"string"}},"required":["invoice_id","score","basis"]}},"next_action":{"type":"string"}},"required":["matches","next_action"]}},{"name":"upsert_vendor_baseline","description":"Create or replace a customer-controlled remittance baseline. Provide a fingerprint, not a raw account number. This is not bank-account ownership verification.","inputSchema":{"type":"object","additionalProperties":false,"properties":{"vendor_reference":{"type":"string","minLength":1},"vendor_name":{"type":"string","minLength":1,"maxLength":250},"remittance_reference":{"type":"string","minLength":4,"maxLength":120},"account_fingerprint":{"type":"string","pattern":"^[a-fA-F0-9]{32,128}$"}},"required":["vendor_reference","vendor_name","remittance_reference","account_fingerprint"]},"outputSchema":{"type":"object","properties":{"id":{"type":"string"},"reference":{"type":"string"},"vendor_name":{"type":"string"},"remittance_reference":{"type":"string"},"account_fingerprint":{"type":"string"}},"required":["id","reference","vendor_name","remittance_reference","account_fingerprint"]}},{"name":"check_remittance_change","description":"Compare submitted fingerprinted remittance details with a customer-controlled vendor baseline. A change requires human out-of-band verification; this is not bank-account ownership verification.","inputSchema":{"type":"object","additionalProperties":false,"properties":{"vendor_reference":{"type":"string","minLength":1},"remittance_reference":{"type":"string","minLength":4,"maxLength":120},"account_fingerprint":{"type":"string","pattern":"^[a-fA-F0-9]{32,128}$"}},"required":["vendor_reference","remittance_reference","account_fingerprint"]},"outputSchema":{"type":"object","properties":{"decision":{"enum":["CLEAR","REVIEW_REQUIRED"]},"exceptions":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"severity":{"enum":["LOW","MEDIUM","HIGH","CRITICAL"]},"message":{"type":"string"},"suggested_next_action":{"type":"string"},"evidence":{"type":"object"}},"required":["code","severity","message","suggested_next_action"]}},"next_action":{"type":"string"}},"required":["decision","exceptions","next_action"]}},{"name":"normalize_invoice_lines","description":"Private preview. Deterministically normalize customer-supplied invoice descriptions, SKUs, and units. It does not invent missing values.","inputSchema":{"type":"object","additionalProperties":false,"properties":{"line_items":{"type":"array","minItems":1,"maxItems":500}},"required":["line_items"]},"outputSchema":{"type":"object","properties":{"status":{"const":"COMPLETED"},"line_items":{"type":"array"},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"severity":{"enum":["LOW","MEDIUM","HIGH","CRITICAL"]},"message":{"type":"string"},"suggested_next_action":{"type":"string"},"evidence":{"type":"object"}},"required":["code","severity","message","suggested_next_action"]}},"next_action":{"type":"string"}},"required":["status","line_items","issues","next_action"]}},{"name":"get_invoice_risk_score","description":"Private preview. Return the deterministic 0-100 control score, priority band, and named evidence signals for a completed invoice.","inputSchema":{"type":"object","additionalProperties":false,"properties":{"invoice_id":{"type":"string","minLength":1}},"required":["invoice_id"]},"outputSchema":{"type":"object","properties":{"invoice_id":{"type":"string"},"score":{"type":"integer","minimum":0,"maximum":100},"band":{"enum":["LOW","MEDIUM","HIGH","CRITICAL"]},"signals":{"type":"array"},"next_action":{"type":"string"}},"required":["invoice_id","score","band","signals","next_action"]}},{"name":"extract_purchase_order","description":"Private preview. Queue one uploaded customer-owned purchase-order document for structured extraction. Poll with get_purchase_order_extraction.","inputSchema":{"type":"object","additionalProperties":false,"properties":{"upload_id":{"type":"string","minLength":1},"idempotency_key":{"type":"string","minLength":8,"maxLength":255}},"required":["upload_id","idempotency_key"]},"outputSchema":{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["QUEUED","PROCESSING","COMPLETED","FAILED"]},"fields":{"type":["object","null"]},"next_action":{"type":"string"}},"required":["id","status","next_action"]}},{"name":"get_purchase_order_extraction","description":"Private preview. Get the caller-owned PO extraction status, canonical fields, OCR evidence, and next action.","inputSchema":{"type":"object","additionalProperties":false,"properties":{"extraction_id":{"type":"string","minLength":1}},"required":["extraction_id"]},"outputSchema":{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["QUEUED","PROCESSING","COMPLETED","FAILED"]},"fields":{"type":["object","null"]},"next_action":{"type":"string"}},"required":["id","status","next_action"]}},{"name":"save_extracted_purchase_order","description":"Private preview. Save a completed extraction as a named PO revision before matching or amendment diffing.","inputSchema":{"type":"object","additionalProperties":false,"properties":{"extraction_id":{"type":"string","minLength":1},"revision_label":{"type":"string","minLength":1,"maxLength":120}},"required":["extraction_id","revision_label"]},"outputSchema":{"type":"object","properties":{"id":{"type":"string"},"po_number":{"type":"string"},"revision_label":{"type":"string"}},"required":["id","po_number","revision_label"]}},{"name":"diff_purchase_order_amendment","description":"Private preview. Compare two saved caller-owned PO revisions and return explicit header, term, and line changes.","inputSchema":{"type":"object","additionalProperties":false,"properties":{"before_purchase_order_id":{"type":"string","minLength":1},"after_purchase_order_id":{"type":"string","minLength":1}},"required":["before_purchase_order_id","after_purchase_order_id"]},"outputSchema":{"type":"object","properties":{"decision":{"enum":["CLEAR","REVIEW_REQUIRED"]},"exceptions":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"severity":{"enum":["LOW","MEDIUM","HIGH","CRITICAL"]},"message":{"type":"string"},"suggested_next_action":{"type":"string"},"evidence":{"type":"object"}},"required":["code","severity","message","suggested_next_action"]}},"next_action":{"type":"string"}},"required":["decision","exceptions","next_action"]}},{"name":"preflight_erp_bill","description":"Check a proposed NetSuite or QuickBooks vendor bill using customer-supplied record references. This tool never connects to or writes to an ERP.","inputSchema":{"type":"object","additionalProperties":false,"properties":{"erp":{"enum":["NETSUITE","QUICKBOOKS"]},"invoice":{"type":"object","additionalProperties":false,"properties":{"vendor_name":{"type":"string","minLength":1,"maxLength":250},"invoice_number":{"type":["string","null"],"maxLength":120},"invoice_date":{"type":["string","null"],"format":"date"},"due_date":{"type":["string","null"],"format":"date"},"currency":{"type":"string","pattern":"^[A-Za-z]{3}$"},"total":{"type":["string","number"],"exclusiveMinimum":0},"line_items":{"type":"array","maxItems":500},"document_sha256":{"type":["string","null"],"pattern":"^[a-fA-F0-9]{64}$"}},"required":["vendor_name","total"]},"vendor_reference":{"type":"string","minLength":1},"source_record_id":{"type":"string","minLength":1},"purchase_order_reference":{"type":"string"},"expected_vendor_reference":{"type":"string"},"expected_currency":{"type":"string","pattern":"^[A-Za-z]{3}$"},"existing_bill_reference":{"type":"string"},"approval_required_above":{"type":["string","number"],"exclusiveMinimum":0},"approval_present":{"type":"boolean"}},"required":["erp","invoice","vendor_reference","source_record_id"]},"outputSchema":{"type":"object","properties":{"product":{"type":"string"},"status":{"const":"COMPLETED"},"decision":{"enum":["CLEAR","REVIEW_REQUIRED","BLOCKED"]},"exceptions":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"severity":{"enum":["LOW","MEDIUM","HIGH","CRITICAL"]},"message":{"type":"string"},"suggested_next_action":{"type":"string"},"evidence":{"type":"object"}},"required":["code","severity","message","suggested_next_action"]}},"evidence":{"type":"object"},"next_action":{"type":"string"}},"required":["product","status","decision","exceptions","evidence","next_action"]}},{"name":"preflight_subcontractor_invoice","description":"Check a subcontractor invoice against supplied commitment, retainage, schedule-of-values, work, lien-waiver, and insurance evidence. It does not determine legal validity of documents.","inputSchema":{"type":"object","additionalProperties":false,"properties":{"invoice":{"type":"object","additionalProperties":false,"properties":{"vendor_name":{"type":"string","minLength":1,"maxLength":250},"invoice_number":{"type":["string","null"],"maxLength":120},"invoice_date":{"type":["string","null"],"format":"date"},"due_date":{"type":["string","null"],"format":"date"},"currency":{"type":"string","pattern":"^[A-Za-z]{3}$"},"total":{"type":["string","number"],"exclusiveMinimum":0},"line_items":{"type":"array","maxItems":500},"document_sha256":{"type":["string","null"],"pattern":"^[a-fA-F0-9]{64}$"}},"required":["vendor_name","total"]},"project_reference":{"type":"string","minLength":1},"subcontract_reference":{"type":"string","minLength":1},"approved_contract_amount":{"type":["string","number"],"exclusiveMinimum":0},"approved_change_order_amount":{"type":["string","number"],"minimum":0},"billed_to_date":{"type":["string","number"],"minimum":0},"current_application_amount":{"type":["string","number"],"exclusiveMinimum":0},"retainage_rate":{"type":["string","number"],"minimum":0,"maximum":1},"retainage_withheld":{"type":["string","number"],"minimum":0},"schedule_of_values_matched":{"type":"boolean"},"work_completed_verified":{"type":"boolean"},"lien_waiver_status":{"enum":["CONDITIONAL","UNCONDITIONAL","MISSING","NOT_REQUIRED"]},"insurance_status":{"enum":["VALID","EXPIRED","MISSING","NOT_REQUIRED"]}},"required":["invoice","project_reference","subcontract_reference","approved_contract_amount","current_application_amount","schedule_of_values_matched","work_completed_verified"]},"outputSchema":{"type":"object","properties":{"product":{"type":"string"},"status":{"const":"COMPLETED"},"decision":{"enum":["CLEAR","REVIEW_REQUIRED","BLOCKED"]},"exceptions":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"severity":{"enum":["LOW","MEDIUM","HIGH","CRITICAL"]},"message":{"type":"string"},"suggested_next_action":{"type":"string"},"evidence":{"type":"object"}},"required":["code","severity","message","suggested_next_action"]}},"evidence":{"type":"object"},"next_action":{"type":"string"}},"required":["product","status","decision","exceptions","evidence","next_action"]}},{"name":"preflight_freight_invoice","description":"Check a freight invoice against supplied shipment, linehaul, fuel, and accessorial policy data. It does not connect to a TMS or carrier system.","inputSchema":{"type":"object","additionalProperties":false,"properties":{"invoice":{"type":"object","additionalProperties":false,"properties":{"vendor_name":{"type":"string","minLength":1,"maxLength":250},"invoice_number":{"type":["string","null"],"maxLength":120},"invoice_date":{"type":["string","null"],"format":"date"},"due_date":{"type":["string","null"],"format":"date"},"currency":{"type":"string","pattern":"^[A-Za-z]{3}$"},"total":{"type":["string","number"],"exclusiveMinimum":0},"line_items":{"type":"array","maxItems":500},"document_sha256":{"type":["string","null"],"pattern":"^[a-fA-F0-9]{64}$"}},"required":["vendor_name","total"]},"shipment_reference":{"type":"string","minLength":1},"carrier_scac":{"type":"string","minLength":2},"quoted_linehaul":{"type":["string","number"],"minimum":0},"invoiced_linehaul":{"type":["string","number"],"minimum":0},"quoted_fuel_surcharge":{"type":["string","number"],"minimum":0},"invoiced_fuel_surcharge":{"type":["string","number"],"minimum":0},"allowed_accessorials":{"type":"array"},"invoiced_accessorials":{"type":"array"},"shipment_delivered":{"type":"boolean"},"duplicate_shipment_invoice":{"type":"boolean"}},"required":["invoice","shipment_reference","carrier_scac","quoted_linehaul","invoiced_linehaul","shipment_delivered"]},"outputSchema":{"type":"object","properties":{"product":{"type":"string"},"status":{"const":"COMPLETED"},"decision":{"enum":["CLEAR","REVIEW_REQUIRED","BLOCKED"]},"exceptions":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"severity":{"enum":["LOW","MEDIUM","HIGH","CRITICAL"]},"message":{"type":"string"},"suggested_next_action":{"type":"string"},"evidence":{"type":"object"}},"required":["code","severity","message","suggested_next_action"]}},"evidence":{"type":"object"},"next_action":{"type":"string"}},"required":["product","status","decision","exceptions","evidence","next_action"]}},{"name":"preflight_franchise_invoice","description":"Find exact same-vendor, same-invoice, same-amount duplicates across customer-supplied multi-location history. It never searches another organization’s records.","inputSchema":{"type":"object","additionalProperties":false,"properties":{"invoice":{"type":"object","additionalProperties":false,"properties":{"vendor_name":{"type":"string","minLength":1,"maxLength":250},"invoice_number":{"type":["string","null"],"maxLength":120},"invoice_date":{"type":["string","null"],"format":"date"},"due_date":{"type":["string","null"],"format":"date"},"currency":{"type":"string","pattern":"^[A-Za-z]{3}$"},"total":{"type":["string","number"],"exclusiveMinimum":0},"line_items":{"type":"array","maxItems":500},"document_sha256":{"type":["string","null"],"pattern":"^[a-fA-F0-9]{64}$"}},"required":["vendor_name","total"]},"location_reference":{"type":"string","minLength":1},"vendor_reference":{"type":"string","minLength":1},"approved_vendor_references":{"type":"array","items":{"type":"string"}},"historical_invoices":{"type":"array"},"location_open":{"type":"boolean"}},"required":["invoice","location_reference","vendor_reference"]},"outputSchema":{"type":"object","properties":{"product":{"type":"string"},"status":{"const":"COMPLETED"},"decision":{"enum":["CLEAR","REVIEW_REQUIRED","BLOCKED"]},"exceptions":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"severity":{"enum":["LOW","MEDIUM","HIGH","CRITICAL"]},"message":{"type":"string"},"suggested_next_action":{"type":"string"},"evidence":{"type":"object"}},"required":["code","severity","message","suggested_next_action"]}},"evidence":{"type":"object"},"next_action":{"type":"string"}},"required":["product","status","decision","exceptions","evidence","next_action"]}},{"name":"check_procurement_agent_action","description":"Evaluate a proposed procurement agent action against supplied budget, authority, category, vendor, contract, and approval policy. It never authorizes a payment or vendor-record change.","inputSchema":{"type":"object","additionalProperties":false,"properties":{"agent_id":{"type":"string","minLength":1},"action":{"enum":["CREATE_PURCHASE_REQUISITION","CREATE_PURCHASE_ORDER","SEND_RFQ","UPDATE_VENDOR","RELEASE_PAYMENT"]},"vendor_reference":{"type":"string"},"category":{"type":"string","minLength":1},"amount":{"type":["string","number"],"exclusiveMinimum":0},"currency":{"type":"string","pattern":"^[A-Za-z]{3}$"},"budget_available":{"type":"boolean"},"requester_authorized":{"type":"boolean"},"vendor_approved":{"type":"boolean"},"contract_reference":{"type":"string"},"approval_required_above":{"type":["string","number"],"minimum":0},"approval_present":{"type":"boolean"},"restricted_categories":{"type":"array","items":{"type":"string"}}},"required":["agent_id","action","category","amount","budget_available","requester_authorized"]},"outputSchema":{"type":"object","properties":{"product":{"type":"string"},"status":{"const":"COMPLETED"},"decision":{"enum":["CLEAR","REVIEW_REQUIRED","BLOCKED"]},"exceptions":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"severity":{"enum":["LOW","MEDIUM","HIGH","CRITICAL"]},"message":{"type":"string"},"suggested_next_action":{"type":"string"},"evidence":{"type":"object"}},"required":["code","severity","message","suggested_next_action"]}},"evidence":{"type":"object"},"next_action":{"type":"string"}},"required":["product","status","decision","exceptions","evidence","next_action"]}},{"name":"resolve_vendor_entity","description":"Resolve customer-supplied vendor names, aliases, addresses, and domains against customer-provided expectations. It is not official verification.","inputSchema":{"type":"object","additionalProperties":false,"properties":{"vendor_name":{"type":"string","minLength":1},"aliases":{"type":"array","items":{"type":"string"}},"address":{"type":"string"},"email_domain":{"type":"string"},"expected_name":{"type":"string"},"expected_address":{"type":"string"},"approved_domains":{"type":"array","items":{"type":"string"}}},"required":["vendor_name"]},"outputSchema":{"type":"object","properties":{"product":{"type":"string"},"status":{"const":"COMPLETED"},"decision":{"enum":["CLEAR","REVIEW_REQUIRED","BLOCKED"]},"exceptions":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"severity":{"enum":["LOW","MEDIUM","HIGH","CRITICAL"]},"message":{"type":"string"},"suggested_next_action":{"type":"string"},"evidence":{"type":"object"}},"required":["code","severity","message","suggested_next_action"]}},"evidence":{"type":"object"},"next_action":{"type":"string"}},"required":["product","status","decision","exceptions","evidence","next_action"]}},{"name":"check_vendor_onboarding","description":"Check customer-defined supplier onboarding packet completeness. It does not approve or create a vendor.","inputSchema":{"type":"object","additionalProperties":false,"properties":{"vendor_reference":{"type":"string","minLength":1},"required_items":{"type":"array","minItems":1,"items":{"type":"string"}},"supplied_items":{"type":"array","items":{"type":"string"}},"approved_by_customer":{"type":"boolean"},"remittance_fingerprint_present":{"type":"boolean"}},"required":["vendor_reference","required_items"]},"outputSchema":{"type":"object","properties":{"product":{"type":"string"},"status":{"const":"COMPLETED"},"decision":{"enum":["CLEAR","REVIEW_REQUIRED","BLOCKED"]},"exceptions":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"severity":{"enum":["LOW","MEDIUM","HIGH","CRITICAL"]},"message":{"type":"string"},"suggested_next_action":{"type":"string"},"evidence":{"type":"object"}},"required":["code","severity","message","suggested_next_action"]}},"evidence":{"type":"object"},"next_action":{"type":"string"}},"required":["product","status","decision","exceptions","evidence","next_action"]}},{"name":"check_tax_form","description":"Check W-9 or W-8 form completeness using only a legal name, final four identifier digits, and supplied dates. It is not tax advice or tax-ID verification.","inputSchema":{"type":"object","additionalProperties":false,"properties":{"form_type":{"enum":["W9","W8BEN","W8BEN_E"]},"legal_name":{"type":"string"},"tax_identifier_last4":{"type":"string","pattern":"^[0-9]{4}$"},"signed_on":{"type":"string","format":"date"},"expires_on":{"type":"string","format":"date"},"entity_country":{"type":"string"}},"required":["form_type"]},"outputSchema":{"type":"object","properties":{"product":{"type":"string"},"status":{"const":"COMPLETED"},"decision":{"enum":["CLEAR","REVIEW_REQUIRED","BLOCKED"]},"exceptions":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"severity":{"enum":["LOW","MEDIUM","HIGH","CRITICAL"]},"message":{"type":"string"},"suggested_next_action":{"type":"string"},"evidence":{"type":"object"}},"required":["code","severity","message","suggested_next_action"]}},"evidence":{"type":"object"},"next_action":{"type":"string"}},"required":["product","status","decision","exceptions","evidence","next_action"]}},{"name":"check_vendor_domain_risk","description":"Compare a sender email domain with customer-provided approved and prior-domain baselines. Verify changes out of band.","inputSchema":{"type":"object","additionalProperties":false,"properties":{"vendor_reference":{"type":"string","minLength":1},"sender_email":{"type":"string","minLength":3},"approved_domains":{"type":"array","items":{"type":"string"}},"prior_sender_domains":{"type":"array","items":{"type":"string"}}},"required":["vendor_reference","sender_email"]},"outputSchema":{"type":"object","properties":{"product":{"type":"string"},"status":{"const":"COMPLETED"},"decision":{"enum":["CLEAR","REVIEW_REQUIRED","BLOCKED"]},"exceptions":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"severity":{"enum":["LOW","MEDIUM","HIGH","CRITICAL"]},"message":{"type":"string"},"suggested_next_action":{"type":"string"},"evidence":{"type":"object"}},"required":["code","severity","message","suggested_next_action"]}},"evidence":{"type":"object"},"next_action":{"type":"string"}},"required":["product","status","decision","exceptions","evidence","next_action"]}},{"name":"compare_quotes","description":"Compare customer-provided vendor quote lines and totals. It never selects or sends a quote.","inputSchema":{"type":"object","additionalProperties":false,"properties":{"quotes":{"type":"array","minItems":2,"items":{"type":"object"}},"expected_currency":{"type":"string"}},"required":["quotes"]},"outputSchema":{"type":"object","properties":{"product":{"type":"string"},"status":{"const":"COMPLETED"},"decision":{"enum":["CLEAR","REVIEW_REQUIRED","BLOCKED"]},"exceptions":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"severity":{"enum":["LOW","MEDIUM","HIGH","CRITICAL"]},"message":{"type":"string"},"suggested_next_action":{"type":"string"},"evidence":{"type":"object"}},"required":["code","severity","message","suggested_next_action"]}},"evidence":{"type":"object"},"next_action":{"type":"string"}},"required":["product","status","decision","exceptions","evidence","next_action"]}},{"name":"extract_contract_obligations","description":"Find candidate ISO dates and obligation indicators in supplied contract text. Review results against the source; this is not legal advice.","inputSchema":{"type":"object","additionalProperties":false,"properties":{"contract_reference":{"type":"string","minLength":1},"contract_text":{"type":"string","minLength":20,"maxLength":100000},"as_of_date":{"type":"string","format":"date"},"lookahead_days":{"type":"integer","minimum":1,"maximum":365}},"required":["contract_reference","contract_text"]},"outputSchema":{"type":"object","properties":{"product":{"type":"string"},"status":{"const":"COMPLETED"},"decision":{"enum":["CLEAR","REVIEW_REQUIRED","BLOCKED"]},"exceptions":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"severity":{"enum":["LOW","MEDIUM","HIGH","CRITICAL"]},"message":{"type":"string"},"suggested_next_action":{"type":"string"},"evidence":{"type":"object"}},"required":["code","severity","message","suggested_next_action"]}},"evidence":{"type":"object"},"next_action":{"type":"string"}},"required":["product","status","decision","exceptions","evidence","next_action"]}},{"name":"check_certificate_expiry","description":"Check expiry windows and customer verification flags for supplied certificate metadata. It does not validate certificate authenticity.","inputSchema":{"type":"object","additionalProperties":false,"properties":{"vendor_reference":{"type":"string","minLength":1},"certificates":{"type":"array","minItems":1,"items":{"type":"object"}},"as_of_date":{"type":"string","format":"date"},"warning_days":{"type":"integer","minimum":1,"maximum":365}},"required":["vendor_reference","certificates"]},"outputSchema":{"type":"object","properties":{"product":{"type":"string"},"status":{"const":"COMPLETED"},"decision":{"enum":["CLEAR","REVIEW_REQUIRED","BLOCKED"]},"exceptions":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"severity":{"enum":["LOW","MEDIUM","HIGH","CRITICAL"]},"message":{"type":"string"},"suggested_next_action":{"type":"string"},"evidence":{"type":"object"}},"required":["code","severity","message","suggested_next_action"]}},"evidence":{"type":"object"},"next_action":{"type":"string"}},"required":["product","status","decision","exceptions","evidence","next_action"]}},{"name":"match_remittance_advice","description":"Match a customer-supplied remittance amount and invoice references to the caller's supplied open-invoice baseline. It never posts a payment.","inputSchema":{"type":"object","additionalProperties":false,"properties":{"remittance_reference":{"type":"string","minLength":1},"vendor_reference":{"type":"string"},"currency":{"type":"string"},"remitted_amount":{"type":["string","number"],"exclusiveMinimum":0},"invoice_references":{"type":"array","items":{"type":"string"}},"open_invoices":{"type":"array","minItems":1,"items":{"type":"object"}}},"required":["remittance_reference","remitted_amount","open_invoices"]},"outputSchema":{"type":"object","properties":{"product":{"type":"string"},"status":{"const":"COMPLETED"},"decision":{"enum":["CLEAR","REVIEW_REQUIRED","BLOCKED"]},"exceptions":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"severity":{"enum":["LOW","MEDIUM","HIGH","CRITICAL"]},"message":{"type":"string"},"suggested_next_action":{"type":"string"},"evidence":{"type":"object"}},"required":["code","severity","message","suggested_next_action"]}},"evidence":{"type":"object"},"next_action":{"type":"string"}},"required":["product","status","decision","exceptions","evidence","next_action"]}},{"name":"normalize_bank_statement","description":"Normalize customer-provided bank transaction records for reconciliation. It never connects to a bank or stores account numbers.","inputSchema":{"type":"object","additionalProperties":false,"properties":{"account_reference":{"type":"string","minLength":1},"transactions":{"type":"array","minItems":1,"items":{"type":"object"}}},"required":["account_reference","transactions"]},"outputSchema":{"type":"object","properties":{"product":{"type":"string"},"status":{"const":"COMPLETED"},"decision":{"enum":["CLEAR","REVIEW_REQUIRED","BLOCKED"]},"exceptions":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"severity":{"enum":["LOW","MEDIUM","HIGH","CRITICAL"]},"message":{"type":"string"},"suggested_next_action":{"type":"string"},"evidence":{"type":"object"}},"required":["code","severity","message","suggested_next_action"]}},"evidence":{"type":"object"},"next_action":{"type":"string"}},"required":["product","status","decision","exceptions","evidence","next_action"]}},{"name":"match_reconciliation","description":"Produce deterministic candidate matches between two caller-provided record sets. It never posts a reconciliation.","inputSchema":{"type":"object","additionalProperties":false,"properties":{"source_records":{"type":"array","minItems":1,"items":{"type":"object"}},"target_records":{"type":"array","minItems":1,"items":{"type":"object"}},"date_tolerance_days":{"type":"integer","minimum":0,"maximum":31}},"required":["source_records","target_records"]},"outputSchema":{"type":"object","properties":{"product":{"type":"string"},"status":{"const":"COMPLETED"},"decision":{"enum":["CLEAR","REVIEW_REQUIRED","BLOCKED"]},"exceptions":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"severity":{"enum":["LOW","MEDIUM","HIGH","CRITICAL"]},"message":{"type":"string"},"suggested_next_action":{"type":"string"},"evidence":{"type":"object"}},"required":["code","severity","message","suggested_next_action"]}},"evidence":{"type":"object"},"next_action":{"type":"string"}},"required":["product","status","decision","exceptions","evidence","next_action"]}}],"resources":[],"prompts":[]}