
Machine-native capabilities with explicit contracts and machine-readable commerce.
Maintain this server? Claim it
Call this server's tools from your browser. Nothing to install.
Requests go through mcptry because browsers can't call most MCP servers directly. Header values are sent to the server for that request only and are never stored or logged.
Tool list from our last check. Connect live to refresh it.
Call immediately before an autonomous system must choose among multiple feasible actions under limited resources, costs, capacities, eligibility rules, and an economic objective. Decision Optimization compiles a typed economic problem — supplier/inventory allocation across sources and demands, task-to-resource assignment, budget-constrained option selection, or production/resource mix — into a bounded MILP model, solves it with a fixed deterministic solver profile, and independently re-verifies the candidate decision against the original problem before returning it. Returns OPTIMAL, FEASIBLE, INFEASIBLE, UNBOUNDED, or NO_SOLUTION with machine-readable evidence: verified feasibility, solver optimality/gap, binding constraints, and stable fingerprints. It does not perform vehicle routing, scheduling, calendar planning, 3D/carton packing, arbitrary LP/MIP solving, natural-language optimization modeling, forecasting, or external data retrieval. Paid invocation: 30000 micro-USD per successful execution.
This tool takes no arguments.
The server marks this tool as destructive. Running it may delete or overwrite data on the server or in any account you connected with your headers.
Call immediately before an autonomous system must choose among multiple feasible actions under limited resources, costs, capacities, eligibility rules, and an economic objective. Decision Optimization compiles a typed economic problem — supplier/inventory allocation across sources and demands, task-to-resource assignment, budget-constrained option selection, or production/resource mix — into a bounded MILP model, solves it with a fixed deterministic solver profile, and independently re-verifies the candidate decision against the original problem before returning it. Returns OPTIMAL, FEASIBLE, INFEASIBLE, UNBOUNDED, or NO_SOLUTION with machine-readable evidence: verified feasibility, solver optimality/gap, binding constraints, and stable fingerprints. It does not perform vehicle routing, scheduling, calendar planning, 3D/carton packing, arbitrary LP/MIP solving, natural-language optimization modeling, forecasting, or external data retrieval. Paid invocation: 30000 micro-USD per successful execution.
No arguments.
{
"type": "object",
"anyOf": [
{
"type": "object",
"required": [
"problem_type",
"objective",
"sources",
"demands",
"lanes"
],
"properties": {
"lanes": {
"type": "array",
"items": {
"type": "object",
"required": [
"source_id",
"demand_id",
"unit_cost"
],
"properties": {
"demand_id": {
"type": "string",
"pattern": "^[^\\x00-\\x1f\\x7f]+$",
"maxLength": 128,
"minLength": 1
},
"source_id": {
"type": "string",
"pattern": "^[^\\x00-\\x1f\\x7f]+$",
"maxLength": 128,
"minLength": 1
},
"unit_cost": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,14})(\\.[0-9]{1,6})?$",
"description": "Nonnegative decimal string, up to 15 integer digits and 6 fractional digits."
},
"max_quantity": {
"type": "string",
"pattern": "^(?!0+(?:\\.0+)?$)(0|[1-9][0-9]{0,14})(\\.[0-9]{1,6})?$",
"description": "Positive decimal string, up to 15 integer digits and 6 fractional digits."
},
"min_quantity": {
"type": "string",
"pattern": "^(?!0+(?:\\.0+)?$)(0|[1-9][0-9]{0,14})(\\.[0-9]{1,6})?$",
"description": "Positive decimal string, up to 15 integer digits and 6 fractional digits."
}
},
"additionalProperties": false
},
"maxItems": 4000,
"minItems": 1
},
"demands": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"requirement",
"satisfaction"
],
"properties": {
"id": {
"type": "string",
"pattern": "^[^\\x00-\\x1f\\x7f]+$",
"maxLength": 128,
"minLength": 1
},
"requirement": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,14})(\\.[0-9]{1,6})?$",
"description": "Nonnegative decimal string, up to 15 integer digits and 6 fractional digits."
},
"max_quantity": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,14})(\\.[0-9]{1,6})?$",
"description": "Nonnegative decimal string, up to 15 integer digits and 6 fractional digits."
},
"satisfaction": {
"anyOf": [
{
"type": "string",
"const": "exact"
},
{
"type": "string",
"const": "at_least"
}
]
}
},
"additionalProperties": false
},
"maxItems": 500,
"minItems": 1
},
"sources": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"capacity"
],
"properties": {
"id": {
"type": "string",
"pattern": "^[^\\x00-\\x1f\\x7f]+$",
"maxLength": 128,
"minLength": 1
},
"capacity": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,14})(\\.[0-9]{1,6})?$",
"description": "Nonnegative decimal string, up to 15 integer digits and 6 fractional digits."
},
"fixed_cost": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,14})(\\.[0-9]{1,6})?$",
"description": "Nonnegative decimal string, up to 15 integer digits and 6 fractional digits."
},
"min_active_quantity": {
"type": "string",
"pattern": "^(?!0+(?:\\.0+)?$)(0|[1-9][0-9]{0,14})(\\.[0-9]{1,6})?$",
"description": "Positive decimal string, up to 15 integer digits and 6 fractional digits."
}
},
"additionalProperties": false
},
"maxItems": 500,
"minItems": 1
},
"objective": {
"type": "string",
"const": "minimize_total_cost"
},
"problem_type": {
"type": "string",
"const": "allocation"
},
"concentration": {
"type": "object",
"required": [
"basis",
"max_share_bps"
],
"properties": {
"basis": {
"anyOf": [
{
"type": "string",
"const": "quantity"
},
{
"type": "string",
"const": "spend"
}
]
},
"max_share_bps": {
"type": "integer",
"maximum": 10000,
"minimum": 0
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"problem_type",
"objective",
"tasks",
"resources",
"pairs"
],
"properties": {
"pairs": {
"type": "array",
"items": {
"type": "object",
"required": [
"task_id",
"resource_id",
"cost_or_value"
],
"properties": {
"task_id": {
"type": "string",
"pattern": "^[^\\x00-\\x1f\\x7f]+$",
"maxLength": 128,
"minLength": 1
},
"consumption": {
"type": "string",
"pattern": "^(?!0+(?:\\.0+)?$)(0|[1-9][0-9]{0,14})(\\.[0-9]{1,6})?$",
"description": "Positive decimal string, up to 15 integer digits and 6 fractional digits."
},
"resource_id": {
"type": "string",
"pattern": "^[^\\x00-\\x1f\\x7f]+$",
"maxLength": 128,
"minLength": 1
},
"cost_or_value": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,14})(\\.[0-9]{1,6})?$",
"description": "Nonnegative decimal string, up to 15 integer digits and 6 fractional digits."
}
},
"additionalProperties": false
},
"maxItems": 4000,
"minItems": 1
},
"tasks": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"required"
],
"properties": {
"id": {
"type": "string",
"pattern": "^[^\\x00-\\x1f\\x7f]+$",
"maxLength": 128,
"minLength": 1
},
"required": {
"type": "boolean"
},
"max_assignments": {
"type": "integer",
"maximum": 500,
"minimum": 1
}
},
"additionalProperties": false
},
"maxItems": 500,
"minItems": 1
},
"objective": {
"anyOf": [
{
"type": "string",
"const": "minimize_total_cost"
},
{
"type": "string",
"const": "maximize_total_value"
}
]
},
"resources": {
"type": "array",
"items": {
"type": "object",
"required": [
"id"
],
"properties": {
"id": {
"type": "string",
"pattern": "^[^\\x00-\\x1f\\x7f]+$",
"maxLength": 128,
"minLength": 1
},
"capacity": {
"type": "string",
"pattern": "^(?!0+(?:\\.0+)?$)(0|[1-9][0-9]{0,14})(\\.[0-9]{1,6})?$",
"description": "Positive decimal string, up to 15 integer digits and 6 fractional digits."
}
},
"additionalProperties": false
},
"maxItems": 500,
"minItems": 1
},
"problem_type": {
"type": "string",
"const": "assignment"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"problem_type",
"objective",
"options",
"budgets"
],
"properties": {
"budgets": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"capacity"
],
"properties": {
"id": {
"type": "string",
"pattern": "^[^\\x00-\\x1f\\x7f]+$",
"maxLength": 128,
"minLength": 1
},
"capacity": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,14})(\\.[0-9]{1,6})?$",
"description": "Nonnegative decimal string, up to 15 integer digits and 6 fractional digits."
}
},
"additionalProperties": false
},
"maxItems": 500,
"minItems": 1
},
"options": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"value"
],
"properties": {
"id": {
"type": "string",
"pattern": "^[^\\x00-\\x1f\\x7f]+$",
"maxLength": 128,
"minLength": 1
},
"value": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,14})(\\.[0-9]{1,6})?$",
"description": "Nonnegative decimal string, up to 15 integer digits and 6 fractional digits."
},
"forbidden": {
"type": "boolean"
},
"mandatory": {
"type": "boolean"
},
"resource_consumption": {
"type": "array",
"items": {
"type": "object",
"required": [
"budget_id",
"amount"
],
"properties": {
"amount": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,14})(\\.[0-9]{1,6})?$",
"description": "Nonnegative decimal string, up to 15 integer digits and 6 fractional digits."
},
"budget_id": {
"type": "string",
"pattern": "^[^\\x00-\\x1f\\x7f]+$",
"maxLength": 128,
"minLength": 1
}
},
"additionalProperties": false
},
"maxItems": 500
}
},
"additionalProperties": false
},
"maxItems": 500,
"minItems": 1
},
"objective": {
"anyOf": [
{
"type": "string",
"const": "maximize_total_value"
},
{
"type": "string",
"const": "minimize_total_cost"
}
]
},
"cardinality": {
"type": "object",
"properties": {
"max_selected": {
"type": "integer",
"maximum": 500,
"minimum": 0
},
"min_selected": {
"type": "integer",
"maximum": 500,
"minimum": 0
}
},
"additionalProperties": false
},
"dependencies": {
"type": "array",
"items": {
"type": "object",
"required": [
"option_id",
"relation",
"related_option_id"
],
"properties": {
"relation": {
"anyOf": [
{
"type": "string",
"const": "requires"
},
{
"type": "string",
"const": "excludes"
}
]
},
"option_id": {
"type": "string",
"pattern": "^[^\\x00-\\x1f\\x7f]+$",
"maxLength": 128,
"minLength": 1
},
"related_option_id": {
"type": "string",
"pattern": "^[^\\x00-\\x1f\\x7f]+$",
"maxLength": 128,
"minLength": 1
}
},
"additionalProperties": false
},
"maxItems": 2000
},
"problem_type": {
"type": "string",
"const": "selection"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"problem_type",
"objective",
"activities",
"resources"
],
"properties": {
"objective": {
"anyOf": [
{
"type": "string",
"const": "maximize_total_value"
},
{
"type": "string",
"const": "minimize_total_cost"
}
]
},
"resources": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"capacity"
],
"properties": {
"id": {
"type": "string",
"pattern": "^[^\\x00-\\x1f\\x7f]+$",
"maxLength": 128,
"minLength": 1
},
"capacity": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,14})(\\.[0-9]{1,6})?$",
"description": "Nonnegative decimal string, up to 15 integer digits and 6 fractional digits."
}
},
"additionalProperties": false
},
"maxItems": 500,
"minItems": 1
},
"activities": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"domain",
"unit_value"
],
"properties": {
"id": {
"type": "string",
"pattern": "^[^\\x00-\\x1f\\x7f]+$",
"maxLength": 128,
"minLength": 1
},
"domain": {
"anyOf": [
{
"type": "string",
"const": "continuous"
},
{
"type": "string",
"const": "integer"
}
]
},
"fixed_cost": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,14})(\\.[0-9]{1,6})?$",
"description": "Nonnegative decimal string, up to 15 integer digits and 6 fractional digits."
},
"unit_value": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,14})(\\.[0-9]{1,6})?$",
"description": "Nonnegative decimal string, up to 15 integer digits and 6 fractional digits."
},
"max_quantity": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,14})(\\.[0-9]{1,6})?$",
"description": "Nonnegative decimal string, up to 15 integer digits and 6 fractional digits."
},
"min_quantity": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,14})(\\.[0-9]{1,6})?$",
"description": "Nonnegative decimal string, up to 15 integer digits and 6 fractional digits."
},
"resource_consumption": {
"type": "array",
"items": {
"type": "object",
"required": [
"resource_id",
"amount"
],
"properties": {
"amount": {
"type": "string",
"pattern": "^(?!0+(?:\\.0+)?$)(0|[1-9][0-9]{0,14})(\\.[0-9]{1,6})?$",
"description": "Positive decimal string, up to 15 integer digits and 6 fractional digits."
},
"resource_id": {
"type": "string",
"pattern": "^[^\\x00-\\x1f\\x7f]+$",
"maxLength": 128,
"minLength": 1
}
},
"additionalProperties": false
},
"maxItems": 200
}
},
"additionalProperties": false
},
"maxItems": 500,
"minItems": 1
},
"problem_type": {
"type": "string",
"const": "mix"
}
},
"additionalProperties": false
}
]
}Call after invoice extraction and immediately before an accounts-payable or procurement agent approves a purchase-order-backed supplier invoice. Invoice Match performs deterministic three-way matching across invoice lines, one or more purchase orders, cumulative goods-receipt evidence, prior invoicing, price tolerances, quantities, units, and exact invoice arithmetic. Cumulative invoicing (prior plus current) is always compared against cumulative receipts and against the ordered quantity, so repeated partial invoices against partial deliveries cannot silently overbill. It returns PROCEED, REVIEW, or BLOCK with line-level discrepancy codes and evidence, and always discloses which checks were and were not performed. Use it for invoice matching, PO matching, 3-way matching, goods-receipt matching, overbilling prevention, and autonomous AP approval controls. It does not OCR documents, infer product matches, retrieve ERP data, determine tax, or execute payment. Paid invocation: 50000 micro-USD per successful execution.
| Argument | Type | Description |
|---|---|---|
| policy | object | |
| invoice* | object | |
| evidence* | object | |
| receipts* | array | |
| match_mode* | string | |
| purchase_orders |
Call before integrating an OpenAPI-described API with autonomous agents to determine whether the contract is machine-actionable. Deterministically analyzes a self-contained OpenAPI 3.0, 3.1, or 3.2 description and returns a readiness score, verdict, and actionable findings covering operation semantics, request and response contracts, authentication clarity, reference integrity, and machine usability. It does not apply when generating a new OpenAPI description from source code. Paid invocation: 30000 micro-USD per successful execution.
| Argument | Type | Description |
|---|---|---|
| document* | object | The OpenAPI description as a parsed JSON object (not a YAML/JSON string). Must include a top-level 'openapi' version field of family 3.0, 3.1, or 3.2. Only inline schemas and local references ('#/...') are analyzed; external or multi-document references are detected and reported, never fetched. |
{
"type": "object",
"required": [
"document"
],
"properties": {
"document": {
"type": "object",
"description": "The OpenAPI description as a parsed JSON object (not a YAML/JSON string). Must include a top-level 'openapi' version field of family 3.0, 3.1, or 3.2. Only inline schemas and local references ('#/...') are analyzed; external or multi-document references are detected and reported, never fetched.",
"patternProperties": {
"^.*$": {}
}
}
},
"additionalProperties": false
}Call immediately before installing or adding an exact third-party npm or PyPI package version. Checks current registry, known vulnerability/malicious-package, publisher withdrawal/deprecation, and verified provenance evidence and returns ALLOW, REVIEW, BLOCK, or UNKNOWN with machine-readable reasons. It accepts only an ECMA-427 Package URL with one exact published version; ranges, dist-tags, Git dependencies, archives, local packages, container images, other ecosystems, dependency graphs, repositories, SBOMs, and source-code or malware analysis are outside this version. It does not install, download, extract, clone, execute, or recommend a package version, and ALLOW never claims that a package is safe. Paid invocation: 10000 micro-USD per successful execution.
| Argument | Type | Description |
|---|---|---|
| purl* | string | ECMA-427 Package URL for one exact published npm or PyPI version. Ranges, dist-tags, qualifiers, and subpaths are not supported. |
| expected_source_repository | string | Optional HTTPS source repository identity to compare only with cryptographically verified deps.dev provenance. This URL is never fetched. |
{
"type": "object",
"required": [
"purl"
],
"properties": {
"purl": {
"type": "string",
"pattern": "^pkg:(?:npm|pypi)/",
"maxLength": 512,
"minLength": 1,
"description": "ECMA-427 Package URL for one exact published npm or PyPI version. Ranges, dist-tags, qualifiers, and subpaths are not supported."
},
"expected_source_repository": {
"type": "string",
"pattern": "^https://",
"maxLength": 2048,
"minLength": 1,
"description": "Optional HTTPS source repository identity to compare only with cryptographically verified deps.dev provenance. This URL is never fetched."
}
},
"additionalProperties": false
}Call immediately before an AI agent, accounts-payable system, treasury workflow, marketplace, or autonomous payment service authorizes or submits an outbound payout. Payout Preflight deterministically compares the candidate payout with caller-supplied trusted payment instructions, exact amount/currency policy, and supplied payout history; validates supported IBAN, US routing, and EVM destination structure; and detects destination changes, duplicate payouts, reused references, and first-seen destinations when history is complete. It returns PROCEED, REVIEW, or BLOCK with machine-readable evidence. Use it for payout validation, payment pre-validation, beneficiary-bank-detail change controls, duplicate-payment prevention, treasury controls, and agent payment guardrails. It does not verify bank-account ownership, perform Verification of Payee, AML/sanctions screening, submit payments, or guarantee settlement. Paid invocation: 50000 micro-USD per successful execution.
| Argument | Type | Description |
|---|---|---|
| payout* | object | |
| policy | object | |
| history | object | |
| trusted_baseline | any |
{
"type": "object",
"required": [
"payout"
],
"properties": {
"payout": {
"type": "object",
"required": [
"destination",
"amount_minor",
"currency"
],
"properties": {
"rail": {
"type": "string",
"pattern": "^[^\\x00-\\x1f\\x7f]+$",
"maxLength": 64,
"minLength": 1
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$",
"description": "ISO 4217-shaped currency code, uppercase ASCII letters only. Not validated against a live registry."
},
"payout_id": {
"type": "string",
"pattern": "^[^\\x00-\\x1f\\x7f]+$",
"maxLength": 256,
"minLength": 1
},
"reference": {
"type": "string",
"pattern": "^[^\\x00-\\x1f\\x7f]+$",
"maxLength": 256,
"minLength": 1
},
"destination": {
"anyOf": [
{
"type": "object",
"required": [
"scheme",
"iban"
],
"properties": {
"bic": {
"type": "string",
"pattern": "^[^\\x00-\\x1f\\x7f]+$",
"maxLength": 20,
"minLength": 1
},
"iban": {
"type": "string",
"pattern": "^[^\\x00-\\x1f\\x7f]+$",
"maxLength": 64,
"minLength": 1
},
"scheme": {
"type": "string",
"const": "iban"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"scheme",
"routing_number",
"account_number"
],
"properties": {
"scheme": {
"type": "string",
"const": "us_bank"
},
"account_number": {
"type": "string",
"pattern": "^[^\\x00-\\x1f\\x7f]+$",
"maxLength": 64,
"minLength": 1
},
"routing_number": {
"type": "string",
"pattern": "^[^\\x00-\\x1f\\x7f]+$",
"maxLength": 20,
"minLength": 1
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"scheme",
"network",
"address"
],
"properties": {
"scheme": {
"type": "string",
"const": "evm"
},
"address": {
"type": "string",
"pattern": "^[^\\x00-\\x1f\\x7f]+$",
"maxLength": 64,
"minLength": 1
},
"network": {
"type": "string",
"pattern": "^[^\\x00-\\x1f\\x7f]+$",
"maxLength": 40,
"minLength": 1
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"scheme",
"namespace",
"value"
],
"properties": {
"value": {
"type": "string",
"pattern": "^[^\\x00-\\x1f\\x7f]+$",
"maxLength": 600,
"minLength": 1
},
"scheme": {
"type": "string",
"const": "opaque"
},
"namespace": {
"type": "string",
"pattern": "^[^\\x00-\\x1f\\x7f]+$",
"maxLength": 80,
"minLength": 1
}
},
"additionalProperties": false
}
]
},
"amount_minor": {
"type": "string",
"pattern": "^[1-9][0-9]{0,29}$",
"description": "Positive minor-unit integer amount as a decimal digit string, parsed via BigInt."
},
"purpose_code": {
"type": "string",
"pattern": "^[^\\x00-\\x1f\\x7f]+$",
"maxLength": 64,
"minLength": 1
},
"beneficiary_id": {
"type": "string",
"pattern": "^[^\\x00-\\x1f\\x7f]+$",
"maxLength": 256,
"minLength": 1
}
},
"additionalProperties": false
},
"policy": {
"type": "object",
"properties": {
"max_amount_minor": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,29})$",
"description": "Nonnegative minor-unit integer amount as a decimal digit string, parsed via BigInt."
},
"bic_change_action": {
"anyOf": [
{
"type": "string",
"const": "ignore"
},
{
"type": "string",
"const": "review"
},
{
"type": "string",
"const": "block"
}
]
},
"allowed_currencies": {
"type": "array",
"items": {
"type": "string",
"pattern": "^[A-Z]{3}$",
"description": "ISO 4217-shaped currency code, uppercase ASCII letters only. Not validated against a live registry."
},
"maxItems": 100
},
"rail_change_action": {
"anyOf": [
{
"type": "string",
"const": "ignore"
},
{
"type": "string",
"const": "review"
},
{
"type": "string",
"const": "block"
}
]
},
"require_evm_checksum": {
"type": "boolean"
},
"currency_change_action": {
"anyOf": [
{
"type": "string",
"const": "ignore"
},
{
"type": "string",
"const": "review"
},
{
"type": "string",
"const": "block"
}
]
},
"exact_duplicate_action": {
"anyOf": [
{
"type": "string",
"const": "ignore"
},
{
"type": "string",
"const": "review"
},
{
"type": "string",
"const": "block"
}
]
},
"reference_change_action": {
"anyOf": [
{
"type": "string",
"const": "ignore"
},
{
"type": "string",
"const": "review"
},
{
"type": "string",
"const": "block"
}
]
},
"beneficiary_change_action": {
"anyOf": [
{
"type": "string",
"const": "ignore"
},
{
"type": "string",
"const": "review"
},
{
"type": "string",
"const": "block"
}
]
},
"destination_change_action": {
"anyOf": [
{
"type": "string",
"const": "review"
},
{
"type": "string",
"const": "block"
}
]
},
"duplicate_reference_action": {
"anyOf": [
{
"type": "string",
"const": "ignore"
},
{
"type": "string",
"const": "review"
},
{
"type": "string",
"const": "block"
}
]
},
"purpose_code_change_action": {
"anyOf": [
{
"type": "string",
"const": "ignore"
},
{
"type": "string",
"const": "review"
},
{
"type": "string",
"const": "block"
}
]
},
"allowed_destination_schemes": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string",
"const": "iban"
},
{
"type": "string",
"const": "us_bank"
},
{
"type": "string",
"const": "evm"
},
{
"type": "string",
"const": "opaque"
}
]
},
"maxItems": 4
},
"require_trusted_destination": {
"type": "boolean"
},
"expected_amount_tolerance_bps": {
"type": "integer",
"maximum": 10000,
"minimum": 0
},
"first_seen_destination_action": {
"anyOf": [
{
"type": "string",
"const": "ignore"
},
{
"type": "string",
"const": "review"
},
{
"type": "string",
"const": "block"
}
]
},
"expected_amount_tolerance_minor": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,29})$",
"description": "Nonnegative minor-unit integer amount as a decimal digit string, parsed via BigInt."
}
},
"additionalProperties": false
},
"history": {
"type": "object",
"required": [
"entries",
"completeness"
],
"properties": {
"entries": {
"type": "array",
"items": {
"anyOf": [
{
"type": "object",
"required": [
"payout_fingerprint"
],
"properties": {
"reference": {
"type": "string",
"pattern": "^[^\\x00-\\x1f\\x7f]+$",
"maxLength": 256,
"minLength": 1
},
"occurred_at": {
"type": "string",
"maxLength": 64,
"description": "RFC3339 timestamp. Evidence metadata only — never independently verified for freshness."
},
"beneficiary_id": {
"type": "string",
"pattern": "^[^\\x00-\\x1f\\x7f]+$",
"maxLength": 256,
"minLength": 1
},
"payout_fingerprint": {
"type": "string",
"pattern": "^sha256:[0-9a-f]{64}$",
"description": "SHA-256 fingerprint, exactly \"sha256:\" followed by 64 lowercase hex characters."
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"destination",
"amount_minor",
"currency"
],
"properties": {
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$",
"description": "ISO 4217-shaped currency code, uppercase ASCII letters only. Not validated against a live registry."
},
"reference": {
"type": "string",
"pattern": "^[^\\x00-\\x1f\\x7f]+$",
"maxLength": 256,
"minLength": 1
},
"destination": {
"anyOf": [
{
"type": "object",
"required": [
"scheme",
"iban"
],
"properties": {
"bic": {
"type": "string",
"pattern": "^[^\\x00-\\x1f\\x7f]+$",
"maxLength": 20,
"minLength": 1
},
"iban": {
"type": "string",
"pattern": "^[^\\x00-\\x1f\\x7f]+$",
"maxLength": 64,
"minLength": 1
},
"scheme": {
"type": "string",
"const": "iban"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"scheme",
"routing_number",
"account_number"
],
"properties": {
"scheme": {
"type": "string",
"const": "us_bank"
},
"account_number": {
"type": "string",
"pattern": "^[^\\x00-\\x1f\\x7f]+$",
"maxLength": 64,
"minLength": 1
},
"routing_number": {
"type": "string",
"pattern": "^[^\\x00-\\x1f\\x7f]+$",
"maxLength": 20,
"minLength": 1
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"scheme",
"network",
"address"
],
"properties": {
"scheme": {
"type": "string",
"const": "evm"
},
"address": {
"type": "string",
"pattern": "^[^\\x00-\\x1f\\x7f]+$",
"maxLength": 64,
"minLength": 1
},
"network": {
"type": "string",
"pattern": "^[^\\x00-\\x1f\\x7f]+$",
"maxLength": 40,
"minLength": 1
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"scheme",
"namespace",
"value"
],
"properties": {
"value": {
"type": "string",
"pattern": "^[^\\x00-\\x1f\\x7f]+$",
"maxLength": 600,
"minLength": 1
},
"scheme": {
"type": "string",
"const": "opaque"
},
"namespace": {
"type": "string",
"pattern": "^[^\\x00-\\x1f\\x7f]+$",
"maxLength": 80,
"minLength": 1
}
},
"additionalProperties": false
}
]
},
"occurred_at": {
"type": "string",
"maxLength": 64,
"description": "RFC3339 timestamp. Evidence metadata only — never independently verified for freshness."
},
"amount_minor": {
"type": "string",
"pattern": "^[1-9][0-9]{0,29}$",
"description": "Positive minor-unit integer amount as a decimal digit string, parsed via BigInt."
},
"beneficiary_id": {
"type": "string",
"pattern": "^[^\\x00-\\x1f\\x7f]+$",
"maxLength": 256,
"minLength": 1
}
},
"additionalProperties": false
}
]
},
"maxItems": 500
},
"window_end": {
"type": "string",
"maxLength": 64,
"description": "RFC3339 timestamp. Evidence metadata only — never independently verified for freshness."
},
"completeness": {
"anyOf": [
{
"type": "string",
"const": "complete"
},
{
"type": "string",
"const": "partial"
}
]
},
"window_start": {
"type": "string",
"maxLength": 64,
"description": "RFC3339 timestamp. Evidence metadata only — never independently verified for freshness."
}
},
"additionalProperties": false
},
"trusted_baseline": {
"anyOf": [
{
"type": "object",
"required": [
"destination"
],
"properties": {
"rail": {
"type": "string",
"pattern": "^[^\\x00-\\x1f\\x7f]+$",
"maxLength": 64,
"minLength": 1
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$",
"description": "ISO 4217-shaped currency code, uppercase ASCII letters only. Not validated against a live registry."
},
"reference": {
"type": "string",
"pattern": "^[^\\x00-\\x1f\\x7f]+$",
"maxLength": 256,
"minLength": 1
},
"destination": {
"anyOf": [
{
"type": "object",
"required": [
"scheme",
"iban"
],
"properties": {
"bic": {
"type": "string",
"pattern": "^[^\\x00-\\x1f\\x7f]+$",
"maxLength": 20,
"minLength": 1
},
"iban": {
"type": "string",
"pattern": "^[^\\x00-\\x1f\\x7f]+$",
"maxLength": 64,
"minLength": 1
},
"scheme": {
"type": "string",
"const": "iban"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"scheme",
"routing_number",
"account_number"
],
"properties": {
"scheme": {
"type": "string",
"const": "us_bank"
},
"account_number": {
"type": "string",
"pattern": "^[^\\x00-\\x1f\\x7f]+$",
"maxLength": 64,
"minLength": 1
},
"routing_number": {
"type": "string",
"pattern": "^[^\\x00-\\x1f\\x7f]+$",
"maxLength": 20,
"minLength": 1
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"scheme",
"network",
"address"
],
"properties": {
"scheme": {
"type": "string",
"const": "evm"
},
"address": {
"type": "string",
"pattern": "^[^\\x00-\\x1f\\x7f]+$",
"maxLength": 64,
"minLength": 1
},
"network": {
"type": "string",
"pattern": "^[^\\x00-\\x1f\\x7f]+$",
"maxLength": 40,
"minLength": 1
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"scheme",
"namespace",
"value"
],
"properties": {
"value": {
"type": "string",
"pattern": "^[^\\x00-\\x1f\\x7f]+$",
"maxLength": 600,
"minLength": 1
},
"scheme": {
"type": "string",
"const": "opaque"
},
"namespace": {
"type": "string",
"pattern": "^[^\\x00-\\x1f\\x7f]+$",
"maxLength": 80,
"minLength": 1
}
},
"additionalProperties": false
}
]
},
"purpose_code": {
"type": "string",
"pattern": "^[^\\x00-\\x1f\\x7f]+$",
"maxLength": 64,
"minLength": 1
},
"beneficiary_id": {
"type": "string",
"pattern": "^[^\\x00-\\x1f\\x7f]+$",
"maxLength": 256,
"minLength": 1
},
"expected_amount_minor": {
"type": "string",
"pattern": "^[1-9][0-9]{0,29}$",
"description": "Positive minor-unit integer amount as a decimal digit string, parsed via BigInt."
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"destination_fingerprint",
"fingerprint_scheme"
],
"properties": {
"rail": {
"type": "string",
"pattern": "^[^\\x00-\\x1f\\x7f]+$",
"maxLength": 64,
"minLength": 1
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$",
"description": "ISO 4217-shaped currency code, uppercase ASCII letters only. Not validated against a live registry."
},
"reference": {
"type": "string",
"pattern": "^[^\\x00-\\x1f\\x7f]+$",
"maxLength": 256,
"minLength": 1
},
"purpose_code": {
"type": "string",
"pattern": "^[^\\x00-\\x1f\\x7f]+$",
"maxLength": 64,
"minLength": 1
},
"beneficiary_id": {
"type": "string",
"pattern": "^[^\\x00-\\x1f\\x7f]+$",
"maxLength": 256,
"minLength": 1
},
"fingerprint_scheme": {
"type": "string",
"const": "payout_destination_v1"
},
"expected_amount_minor": {
"type": "string",
"pattern": "^[1-9][0-9]{0,29}$",
"description": "Positive minor-unit integer amount as a decimal digit string, parsed via BigInt."
},
"destination_fingerprint": {
"type": "string",
"pattern": "^sha256:[0-9a-f]{64}$",
"description": "SHA-256 fingerprint, exactly \"sha256:\" followed by 64 lowercase hex characters."
}
},
"additionalProperties": false
}
]
}
},
"additionalProperties": false
}Call this immediately before an autonomous agent, coding assistant, or automated pipeline executes PostgreSQL write, DDL, or administrative SQL against a production-capable connection. It parses the complete statement set with a real PostgreSQL AST parser and prevents the costly mistake of an agent silently deleting, truncating, or dropping data it should not have touched. It detects unbounded DELETE and UPDATE (no WHERE clause), TRUNCATE, destructive DROP and CASCADE, mutation of caller-declared protected relations, and availability-sensitive DDL such as a non-concurrent CREATE INDEX or hazardous ALTER TABLE change. It returns a deterministic PROCEED, REVIEW, or BLOCK decision with stable reason codes, a per-statement inventory, and an explicit coverage report of exactly what was and was not assessed — parse failure and unparseable or unmodeled syntax always fail closed to REVIEW, never PROCEED. PostgreSQL is the only supported dialect in this version. It does not apply when executing SQL or connecting to a database. Paid invocation: 50000 micro-USD per successful execution.
| Argument | Type | Description |
|---|---|---|
| sql* | string | A complete PostgreSQL statement or semicolon-separated statement list. |
| policy | object | |
| context | object |
{
"type": "object",
"required": [
"sql"
],
"properties": {
"sql": {
"type": "string",
"maxLength": 65536,
"minLength": 1,
"description": "A complete PostgreSQL statement or semicolon-separated statement list."
},
"policy": {
"type": "object",
"properties": {
"block_cascade": {
"type": "boolean"
},
"block_truncate": {
"type": "boolean"
},
"max_statements": {
"type": "integer",
"maximum": 20,
"minimum": 1
},
"block_drop_table": {
"type": "boolean"
},
"alter_table_action": {
"anyOf": [
{
"type": "string",
"const": "proceed"
},
{
"type": "string",
"const": "review"
},
{
"type": "string",
"const": "block"
}
]
},
"block_unbounded_delete": {
"type": "boolean"
},
"block_unbounded_update": {
"type": "boolean"
},
"nonconcurrent_index_action": {
"anyOf": [
{
"type": "string",
"const": "proceed"
},
{
"type": "string",
"const": "review"
},
{
"type": "string",
"const": "block"
}
]
},
"unsupported_statement_action": {
"anyOf": [
{
"type": "string",
"const": "review"
},
{
"type": "string",
"const": "block"
}
]
},
"procedural_or_dynamic_sql_action": {
"anyOf": [
{
"type": "string",
"const": "review"
},
{
"type": "string",
"const": "block"
}
]
},
"block_protected_relation_mutation": {
"type": "boolean"
}
},
"additionalProperties": false
},
"context": {
"type": "object",
"properties": {
"environment": {
"anyOf": [
{
"type": "string",
"const": "production"
},
{
"type": "string",
"const": "staging"
},
{
"type": "string",
"const": "development"
},
{
"type": "string",
"const": "unknown"
}
]
},
"protected_schemas": {
"type": "array",
"items": {
"type": "string"
},
"maxItems": 200
},
"protected_relations": {
"type": "array",
"items": {
"type": "string"
},
"maxItems": 200
},
"expected_statement_kinds": {
"type": "array",
"items": {
"type": "string"
},
"maxItems": 50
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}| array |
| recent_invoices | array |
{
"type": "object",
"required": [
"match_mode",
"invoice",
"purchase_orders",
"receipts",
"evidence"
],
"properties": {
"policy": {
"type": "object",
"properties": {
"quantity_match_mode": {
"anyOf": [
{
"type": "string",
"const": "not_exceed_received"
},
{
"type": "string",
"const": "exact_received"
}
]
},
"block_currency_mismatch": {
"type": "boolean"
},
"block_supplier_mismatch": {
"type": "boolean"
},
"duplicate_invoice_action": {
"anyOf": [
{
"type": "string",
"const": "ignore"
},
{
"type": "string",
"const": "review"
},
{
"type": "string",
"const": "block"
}
]
},
"require_receipt_evidence": {
"type": "boolean"
},
"unit_price_tolerance_bps": {
"type": "integer",
"maximum": 10000,
"minimum": 0
},
"line_total_tolerance_minor": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,31})$",
"description": "Nonnegative minor-unit integer amount as a decimal digit string, parsed exactly via BigInt."
},
"block_quantity_over_ordered": {
"type": "boolean"
},
"block_quantity_over_received": {
"type": "boolean"
},
"invoice_total_tolerance_minor": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,31})$",
"description": "Nonnegative minor-unit integer amount as a decimal digit string, parsed exactly via BigInt."
},
"require_complete_prior_invoicing": {
"type": "boolean"
},
"require_complete_receipt_snapshot": {
"type": "boolean"
}
},
"additionalProperties": false
},
"invoice": {
"type": "object",
"required": [
"id",
"invoice_number",
"currency",
"lines",
"subtotal_minor",
"total_minor"
],
"properties": {
"id": {
"type": "string",
"pattern": "^[^\\x00-\\x1f\\x7f]+$",
"maxLength": 256,
"minLength": 1
},
"lines": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"purchase_order_id",
"po_line_id",
"quantity",
"unit_price_minor",
"line_net_minor"
],
"properties": {
"id": {
"type": "string",
"pattern": "^[^\\x00-\\x1f\\x7f]+$",
"maxLength": 256,
"minLength": 1
},
"quantity": {
"type": "string",
"pattern": "^(?!0+(?:\\.0+)?$)(0|[1-9][0-9]{0,23})(\\.[0-9]{1,6})?$",
"description": "Positive decimal quantity, up to 6 fractional digits."
},
"po_line_id": {
"type": "string",
"pattern": "^[^\\x00-\\x1f\\x7f]+$",
"maxLength": 256,
"minLength": 1
},
"line_net_minor": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,31})$",
"description": "Nonnegative minor-unit integer amount as a decimal digit string, parsed exactly via BigInt."
},
"unit_of_measure": {
"type": "string",
"maxLength": 64,
"minLength": 1
},
"unit_price_minor": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,31})$",
"description": "Nonnegative minor-unit integer amount as a decimal digit string, parsed exactly via BigInt."
},
"purchase_order_id": {
"type": "string",
"pattern": "^[^\\x00-\\x1f\\x7f]+$",
"maxLength": 256,
"minLength": 1
},
"price_basis_quantity": {
"type": "string",
"pattern": "^(?!0+(?:\\.0+)?$)(0|[1-9][0-9]{0,23})(\\.[0-9]{1,6})?$",
"description": "Positive decimal quantity, up to 6 fractional digits."
}
},
"additionalProperties": false
},
"maxItems": 250,
"minItems": 1
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$",
"description": "ISO 4217-shaped currency code, uppercase ASCII letters only. Not validated against a live registry."
},
"tax_minor": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,31})$",
"description": "Nonnegative minor-unit integer amount as a decimal digit string, parsed exactly via BigInt."
},
"supplier_id": {
"type": "string",
"pattern": "^[^\\x00-\\x1f\\x7f]+$",
"maxLength": 256,
"minLength": 1
},
"total_minor": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,31})$",
"description": "Nonnegative minor-unit integer amount as a decimal digit string, parsed exactly via BigInt."
},
"charges_minor": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,31})$",
"description": "Nonnegative minor-unit integer amount as a decimal digit string, parsed exactly via BigInt."
},
"discount_minor": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,31})$",
"description": "Nonnegative minor-unit integer amount as a decimal digit string, parsed exactly via BigInt."
},
"invoice_number": {
"type": "string",
"pattern": "^[^\\x00-\\x1f\\x7f]+$",
"maxLength": 256,
"minLength": 1
},
"shipping_minor": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,31})$",
"description": "Nonnegative minor-unit integer amount as a decimal digit string, parsed exactly via BigInt."
},
"subtotal_minor": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,31})$",
"description": "Nonnegative minor-unit integer amount as a decimal digit string, parsed exactly via BigInt."
}
},
"additionalProperties": false
},
"evidence": {
"type": "object",
"required": [
"receipts_complete",
"prior_invoicing_complete"
],
"properties": {
"receipts_as_of": {
"type": "string",
"maxLength": 64,
"description": "RFC3339 timestamp. Evidence metadata only — never independently verified for freshness (§6.6)."
},
"receipts_complete": {
"type": "boolean"
},
"prior_invoicing_as_of": {
"type": "string",
"maxLength": 64,
"description": "RFC3339 timestamp. Evidence metadata only — never independently verified for freshness (§6.6)."
},
"prior_invoicing_complete": {
"type": "boolean"
}
},
"additionalProperties": false
},
"receipts": {
"type": "array",
"items": {
"type": "object",
"required": [
"purchase_order_id",
"po_line_id",
"received_quantity"
],
"properties": {
"id": {
"type": "string",
"pattern": "^[^\\x00-\\x1f\\x7f]+$",
"maxLength": 256,
"minLength": 1
},
"po_line_id": {
"type": "string",
"pattern": "^[^\\x00-\\x1f\\x7f]+$",
"maxLength": 256,
"minLength": 1
},
"received_at": {
"type": "string",
"maxLength": 64,
"description": "RFC3339 timestamp. Evidence metadata only — never independently verified for freshness (§6.6)."
},
"purchase_order_id": {
"type": "string",
"pattern": "^[^\\x00-\\x1f\\x7f]+$",
"maxLength": 256,
"minLength": 1
},
"received_quantity": {
"type": "string",
"pattern": "^(?!0+(?:\\.0+)?$)(0|[1-9][0-9]{0,23})(\\.[0-9]{1,6})?$",
"description": "Positive decimal quantity, up to 6 fractional digits."
}
},
"additionalProperties": false
},
"maxItems": 2000
},
"match_mode": {
"type": "string",
"const": "three_way"
},
"purchase_orders": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"currency",
"lines"
],
"properties": {
"id": {
"type": "string",
"pattern": "^[^\\x00-\\x1f\\x7f]+$",
"maxLength": 256,
"minLength": 1
},
"lines": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"ordered_quantity",
"previously_invoiced_quantity",
"unit_price_minor"
],
"properties": {
"id": {
"type": "string",
"pattern": "^[^\\x00-\\x1f\\x7f]+$",
"maxLength": 256,
"minLength": 1
},
"unit_of_measure": {
"type": "string",
"maxLength": 64,
"minLength": 1
},
"ordered_quantity": {
"type": "string",
"pattern": "^(?!0+(?:\\.0+)?$)(0|[1-9][0-9]{0,23})(\\.[0-9]{1,6})?$",
"description": "Positive decimal quantity, up to 6 fractional digits."
},
"unit_price_minor": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,31})$",
"description": "Nonnegative minor-unit integer amount as a decimal digit string, parsed exactly via BigInt."
},
"price_basis_quantity": {
"type": "string",
"pattern": "^(?!0+(?:\\.0+)?$)(0|[1-9][0-9]{0,23})(\\.[0-9]{1,6})?$",
"description": "Positive decimal quantity, up to 6 fractional digits."
},
"previously_invoiced_quantity": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,23})(\\.[0-9]{1,6})?$",
"description": "Nonnegative decimal quantity, up to 6 fractional digits. \"0\" is required (not omission) for a line with no prior invoicing."
}
},
"additionalProperties": false
},
"maxItems": 1000,
"minItems": 1
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$",
"description": "ISO 4217-shaped currency code, uppercase ASCII letters only. Not validated against a live registry."
},
"supplier_id": {
"type": "string",
"pattern": "^[^\\x00-\\x1f\\x7f]+$",
"maxLength": 256,
"minLength": 1
}
},
"additionalProperties": false
},
"maxItems": 50,
"minItems": 1
},
"recent_invoices": {
"type": "array",
"items": {
"type": "object",
"required": [
"invoice_number"
],
"properties": {
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$",
"description": "ISO 4217-shaped currency code, uppercase ASCII letters only. Not validated against a live registry."
},
"occurred_at": {
"type": "string",
"maxLength": 64,
"description": "RFC3339 timestamp. Evidence metadata only — never independently verified for freshness (§6.6)."
},
"supplier_id": {
"type": "string",
"pattern": "^[^\\x00-\\x1f\\x7f]+$",
"maxLength": 256,
"minLength": 1
},
"total_minor": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,31})$",
"description": "Nonnegative minor-unit integer amount as a decimal digit string, parsed exactly via BigInt."
},
"invoice_number": {
"type": "string",
"pattern": "^[^\\x00-\\x1f\\x7f]+$",
"maxLength": 256,
"minLength": 1
}
},
"additionalProperties": false
},
"maxItems": 500
}
},
"additionalProperties": false
}