{
  "ok": true,
  "name": "praman-spend-guard",
  "version": "1.0.0",
  "protocolVersion": "2025-03-26",
  "transport": "streamable-http",
  "endpoint": "/api/mcp",
  "authentication": "none",
  "stdioCommand": "npx -y --package=github:VishAlgoDev/praman-desk praman-spend-guard-mcp",
  "capabilities": {
    "tools": {}
  },
  "toolsCount": 29,
  "tools": [
    {
      "name": "verify_counterparty",
      "description": "Verify counterparty legal identity, LEI registration status, jurisdiction, and multi-jurisdiction tax syntax (US EIN, UK VAT, EU VAT, Indian GSTIN, ISO 17442 LEI) querying live GLEIF registry.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "vendor": {
            "type": "string",
            "description": "Legal or operating entity name (e.g. \"Apple Inc.\", \"SAP SE\", \"Stripe\")."
          },
          "vat_number": {
            "type": "string",
            "description": "Tax/VAT identifier (e.g. \"12-3456789\", \"GB123456789\", \"DE123456789\", \"27AABCU9603R1ZN\")."
          },
          "lei": {
            "type": "string",
            "description": "20-character ISO 17442 Legal Entity Identifier (e.g. \"HWUPKR0MPOU8FGXBT394\")."
          }
        },
        "required": [
          "vendor"
        ]
      }
    },
    {
      "name": "reconcile_invoice",
      "description": "Perform deterministic 3-way mathematical reconciliation across invoice billed quantities, unit prices, tax rates, and warehouse accepted receipts.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "invoice_id": {
            "type": "string",
            "description": "Invoice identifier (e.g. \"INV-2026-104\")."
          },
          "po_number": {
            "type": "string",
            "description": "Purchase Order reference (e.g. \"PO-2026-880\")."
          },
          "billed_qty": {
            "type": "number",
            "description": "Quantity billed on invoice."
          },
          "accepted_qty": {
            "type": "number",
            "description": "Quantity accepted in goods receipt/ledger."
          },
          "unit_price": {
            "type": "number",
            "description": "Agreed unit rate."
          },
          "tax_rate_pct": {
            "type": "number",
            "description": "Applicable tax percentage (e.g. 8.25 for 8.25%).",
            "default": 0
          },
          "currency": {
            "type": "string",
            "description": "Currency code (e.g. \"USD\", \"EUR\").",
            "default": "USD"
          }
        },
        "required": [
          "invoice_id",
          "po_number",
          "billed_qty",
          "accepted_qty",
          "unit_price"
        ]
      }
    },
    {
      "name": "verify_spend_authorization",
      "description": "Validate spend against organizational approval delegation caps and dual-signoff policies.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "po_number": {
            "type": "string",
            "description": "Purchase Order reference."
          },
          "vendor": {
            "type": "string",
            "description": "Counterparty vendor name."
          },
          "amount": {
            "type": "number",
            "description": "Total spend amount."
          },
          "approval_cap": {
            "type": "number",
            "description": "Authorized spender delegation cap."
          },
          "currency": {
            "type": "string",
            "description": "Currency code.",
            "default": "USD"
          },
          "dual_signoff_present": {
            "type": "boolean",
            "description": "Whether executive dual sign-off is attached.",
            "default": false
          }
        },
        "required": [
          "po_number",
          "vendor",
          "amount",
          "approval_cap"
        ]
      }
    },
    {
      "name": "verify_receipt_provenance",
      "description": "Audit 64-hex SHA-256 cryptographic invoice/receipt digests against face value amounts to detect alteration or tampering.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "document_ref": {
            "type": "string",
            "description": "Document reference or filename."
          },
          "sha256_digest": {
            "type": "string",
            "description": "64-character hexadecimal SHA-256 digest."
          },
          "signed_amount": {
            "type": "number",
            "description": "Amount encoded in cryptographic signed payload."
          },
          "face_amount": {
            "type": "number",
            "description": "Invoice face value amount."
          },
          "currency": {
            "type": "string",
            "description": "Currency code.",
            "default": "USD"
          }
        },
        "required": [
          "document_ref",
          "sha256_digest",
          "signed_amount",
          "face_amount"
        ]
      }
    },
    {
      "name": "clear_spend",
      "description": "Execute complete pre-payment spend clearance gate. Combines GLEIF entity verification, 3-way reconciliation, spend delegation checks, and cryptographic receipt audits into a single pass/hold decision.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "vendor": {
            "type": "string",
            "description": "Counterparty entity name."
          },
          "vat_number": {
            "type": "string",
            "description": "Tax/VAT identifier (optional)."
          },
          "lei": {
            "type": "string",
            "description": "ISO 17442 LEI (optional)."
          },
          "invoice_id": {
            "type": "string",
            "description": "Invoice number."
          },
          "po_number": {
            "type": "string",
            "description": "Purchase Order reference."
          },
          "billed_qty": {
            "type": "number",
            "description": "Quantity billed."
          },
          "accepted_qty": {
            "type": "number",
            "description": "Quantity accepted in receipt."
          },
          "unit_price": {
            "type": "number",
            "description": "Contracted unit price."
          },
          "tax_rate_pct": {
            "type": "number",
            "description": "Tax rate percentage.",
            "default": 0
          },
          "approval_cap": {
            "type": "number",
            "description": "Spender delegation cap."
          },
          "sha256_digest": {
            "type": "string",
            "description": "Cryptographic SHA-256 digest of document."
          },
          "currency": {
            "type": "string",
            "description": "Currency code.",
            "default": "USD"
          },
          "dual_signoff_present": {
            "type": "boolean",
            "description": "Whether dual sign-off is attached.",
            "default": false
          },
          "payment_url": {
            "type": "string",
            "description": "Optional invoice payment link or dApp URL to screen for phishing/drainer reputation via FakeWatch."
          }
        },
        "required": [
          "vendor",
          "invoice_id",
          "po_number",
          "billed_qty",
          "accepted_qty",
          "unit_price",
          "approval_cap"
        ]
      }
    },
    {
      "name": "compare_evaluator_scoring",
      "description": "Deterministic WASM evaluation comparator scoring ground-truth vs miner output using AssemblyScript Stage 2 module (Exact, AbsTol, RelTol, PassFail).",
      "inputSchema": {
        "type": "object",
        "properties": {
          "ground_truth": {
            "description": "Ground truth value (integer number or wei-scale string, e.g. \"1000000000000000000\").",
            "oneOf": [
              {
                "type": "number"
              },
              {
                "type": "string"
              }
            ]
          },
          "miner_output": {
            "description": "Miner evaluated value (integer number or wei-scale string).",
            "oneOf": [
              {
                "type": "number"
              },
              {
                "type": "string"
              }
            ]
          },
          "rule_code": {
            "type": "number",
            "description": "Comparison rule code (0=Exact, 1=AbsTol, 2=RelTol, 3=PassFail).",
            "default": 0
          },
          "tolerance": {
            "description": "Tolerance delta or basis points (number or string, e.g. 500 for 5%).",
            "oneOf": [
              {
                "type": "number"
              },
              {
                "type": "string"
              }
            ],
            "default": 0
          }
        },
        "required": [
          "ground_truth",
          "miner_output"
        ]
      }
    },
    {
      "name": "screen_sanctions",
      "description": "Screen counterparty entity or individual name against the US Treasury OFAC Specially Designated Nationals (SDN) sanctions list with fuzzy bigram matching across primary names and aliases.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Entity or person name to screen (e.g. \"Apple Inc.\", \"Bank Rossiya\", \"Al-Qaida\")."
          },
          "threshold": {
            "type": "number",
            "description": "Similarity threshold from 0.0 to 1.0 (default 0.70).",
            "default": 0.7
          }
        },
        "required": [
          "name"
        ]
      }
    },
    {
      "name": "lookup_corporate_registry",
      "description": "Query the official GLEIF Global LEI Index across 200+ jurisdictions to verify legal entity registration status, LEI, registered and headquarters addresses.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "company": {
            "type": "string",
            "description": "Company or legal entity name (e.g. \"Stripe\", \"SAP SE\", \"Tesla Inc\")."
          },
          "jurisdiction": {
            "type": "string",
            "description": "ISO 3166-1 alpha-2 country code (e.g. \"US\", \"DE\", \"GB\")."
          }
        },
        "required": [
          "company"
        ]
      }
    },
    {
      "name": "monitor_regulatory_filings",
      "description": "Monitor authoritative regulatory filings across SEC EDGAR (10-K, 10-Q, 8-K), US Federal Register notices, and GLEIF renewal records for a corporation.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "company": {
            "type": "string",
            "description": "Company name to check filings for (e.g. \"Tesla Inc\", \"Pfizer\", \"Goldman Sachs\")."
          },
          "period": {
            "type": "string",
            "description": "Filing period or year (e.g. \"2026\", \"2025\").",
            "default": "2026"
          }
        },
        "required": [
          "company"
        ]
      }
    },
    {
      "name": "screen_stablecoin_settlement",
      "description": "Mission 02 Stablecoin Pre-Payment & On-Chain Settlement Gate: checks live Ethereum Sepolia JSON-RPC block state & USDC balance, enforces OFAC SDN freeze (REJECT_AND_FREEZE), FATF Travel Rule (>=$1,000 identity requirement), delegation cap limits, and optional ERC-20 Transfer txHash WASM verification.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "recipient_address": {
            "type": "string",
            "description": "Recipient EVM 0x address on Ethereum Sepolia."
          },
          "sender_address": {
            "type": "string",
            "description": "Optional sender treasury EVM 0x address (defaults to contributor wallet)."
          },
          "amount_usdc": {
            "type": "number",
            "description": "Requested USDC transfer amount (e.g. 25.0)."
          },
          "beneficiary_name": {
            "type": "string",
            "description": "Legal/counterparty name of beneficiary for OFAC SDN, GLEIF LEI, and FATF Travel Rule screening."
          },
          "originator_name": {
            "type": "string",
            "description": "Originator/sender legal entity or VASP identity (required by FATF Travel Rule when amount_usdc >= 1000)."
          },
          "delegation_cap_usdc": {
            "type": "number",
            "description": "Treasury delegation cap in USDC before dual sign-off is required.",
            "default": 5000
          },
          "dual_signoff_present": {
            "type": "boolean",
            "description": "Whether executive dual sign-off has been obtained.",
            "default": false
          },
          "tx_hash": {
            "type": "string",
            "description": "Optional Sepolia ERC-20 Transfer txHash to audit settled on-chain logs against amount_usdc via WASM."
          }
        },
        "required": [
          "recipient_address",
          "amount_usdc"
        ]
      }
    },
    {
      "name": "get_compliance_certificate",
      "description": "Generate a bank-grade cryptographic compliance audit certificate with SHA-256 seal, OFAC zero-hit attestation, GLEIF LEI verification, and on-chain Sepolia Diamond proof.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "entity": {
            "type": "string",
            "description": "Legal entity or vendor name to certify (e.g. \"Apple Inc.\", \"Stripe, LLC\")."
          },
          "lei": {
            "type": "string",
            "description": "Optional 20-character ISO 17442 Legal Entity Identifier."
          },
          "jurisdiction": {
            "type": "string",
            "description": "Country or jurisdiction code (e.g. \"US\", \"DE\", \"GB\").",
            "default": "US"
          },
          "invoice_amount": {
            "type": "number",
            "description": "Optional invoice amount for bit-exact WASM reconciliation."
          },
          "po_amount": {
            "type": "number",
            "description": "Optional purchase order amount for bit-exact WASM reconciliation."
          }
        },
        "required": [
          "entity"
        ]
      }
    },
    {
      "name": "fakewatch_counterparty_shield",
      "description": "Reciprocal counterparty shield with FakeWatch (Miner #42420). Evaluates destination URL/domain safety, phishing threats, OFAC SDN sanctions, and corporate LEI validity.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "description": "Payment link or dApp URL to verify against phishing feeds."
          },
          "domain": {
            "type": "string",
            "description": "Hostname or domain name (e.g. \"uniswap.org\", \"stripe.com\")."
          },
          "vendor": {
            "type": "string",
            "description": "Vendor or counterparty legal entity name."
          },
          "lei": {
            "type": "string",
            "description": "Optional Legal Entity Identifier."
          },
          "amount": {
            "type": "number",
            "description": "Transaction amount."
          },
          "currency": {
            "type": "string",
            "description": "Currency code (default USD).",
            "default": "USD"
          }
        }
      }
    },
    {
      "name": "rugreceipt_contract_screen",
      "description": "Reciprocal smart contract safety screen with RugReceipt (Issue #208). Checks smart contract and deployer EVM addresses against OFAC SDN digital currency lists and exploit records.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "contract_address": {
            "type": "string",
            "description": "EVM smart contract address (0x...) to screen."
          },
          "deployer_address": {
            "type": "string",
            "description": "Deployer or owner EVM address (0x...)."
          },
          "token_symbol": {
            "type": "string",
            "description": "Token ticker or symbol.",
            "default": "TOKEN"
          }
        }
      }
    },
    {
      "name": "paysheet_consensus_screen",
      "description": "3-Way Consensus Payroll Shield with Paysheet (Issue #214 / PR #1). Evaluates payout recipient across 3 independent Telegraph Season II miners (#731002, #64175, Praman Desk #6164) with sub-25ms in-memory OFAC SDN & EVM screening.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "target": {
            "type": "string",
            "description": "Recipient entity name or EVM wallet address (0x...) to screen across consensus quorum."
          },
          "amount_usdc": {
            "type": "string",
            "description": "Payroll stream or payout amount in USDC (e.g. \"500.00\").",
            "default": "0.00"
          },
          "payroll_id": {
            "type": "string",
            "description": "Internal payroll batch identifier.",
            "default": "PAYROLL-DEFAULT"
          }
        },
        "required": [
          "target"
        ]
      }
    },
    {
      "name": "audit_contract_obligation",
      "description": "Mission 04 & CONTRACT_OBLIGATION_AUDIT_GENERAL: Audit contractual terms, statutory regimes (MahaRERA delay interest, FIDIC Sub-Clause 20.1 time-bar, MSMED Act 45-day statutory payment, CAM caps, FIDIC retention release, price variation deadband), and return deterministic compliance verdicts.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "text": {
            "type": "string",
            "description": "Contract clause, dispute prompt, or legal terms to audit (e.g. \"MahaRERA Section 18 delay interest\", \"FIDIC Sub-Clause 20.1 EOT notice\")."
          }
        },
        "required": [
          "text"
        ]
      }
    },
    {
      "name": "query_mining_intelligence",
      "description": "Deep Intelligence & MINING_INTELLIGENCE_GENERAL: Query authoritative geological resource records across Queensland, Western Australia (Kalgoorlie), Nevada (Carlin Trend), South Africa (Witwatersrand), India (Kolar Gold Fields), and global deposits. Grounded in GSQ, GSWA, USGS, CGS, and GSI records.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "query": {
            "type": "string",
            "description": "Historical mine, deposit, or geological query to investigate (e.g. \"Mount Morgan Mine\", \"Kalgoorlie Super Pit\", \"Carlin Trend\", \"Witwatersrand\", \"Kolar Gold Fields\")."
          }
        },
        "required": [
          "query"
        ]
      }
    },
    {
      "name": "arbitrate_mining_discrepancies",
      "description": "Universal Multi-Miner Aggregator: Aggregate candidate intelligence from multiple Telegraph miners for any global resource asset or deposit, detect mathematical/geological discrepancies (>15% variance, chronological anomalies), and arbitrate an attestation digest with SHA-256 seal.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "site": {
            "type": "string",
            "description": "Deposit, resource site, or asset to arbitrate (e.g. \"Mount Morgan Mine\", \"Kalgoorlie Super Pit\", \"Carlin Trend\")."
          },
          "candidates": {
            "type": "array",
            "description": "Candidate miner intelligence objects with minerId and content."
          }
        },
        "required": [
          "site"
        ]
      }
    },
    {
      "name": "query_grid_power_price",
      "description": "Mission 12 / GRID_POWER_PRICE_GENERAL: Query authoritative wholesale grid power pricing, Locational Marginal Pricing (LMP), and settlement point prices for CAISO (NP15, SP15, ZP26) and ERCOT (North, South, West, Houston).",
      "inputSchema": {
        "type": "object",
        "properties": {
          "hub": {
            "type": "string",
            "description": "Grid pricing hub or settlement node (e.g. \"NP15\", \"SP15\", \"ERCOT North\", \"Houston\")."
          },
          "iso": {
            "type": "string",
            "description": "Independent System Operator (e.g. \"CAISO\", \"ERCOT\", \"NYISO\")."
          },
          "market": {
            "type": "string",
            "description": "Market interval: \"RTM\" (Real-Time Market) or \"DAM\" (Day-Ahead Market)."
          },
          "query": {
            "type": "string",
            "description": "Natural language energy price query."
          }
        }
      }
    },
    {
      "name": "audit_creative_qa",
      "description": "ByteDance Use Case #5 — Independent Creative Quality Assurance: Screen ad sponsor KYB (GLEIF + OFAC SDN), CTA phishing URL safety, #ad / AI-generated disclosures, prohibited claims, and 651B WASM insertion-order budget math before escrow release.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "campaignId": {
            "type": "string",
            "description": "Campaign identifier"
          },
          "advertiserName": {
            "type": "string",
            "description": "Sponsor / advertiser legal entity name"
          },
          "creativeTitle": {
            "type": "string",
            "description": "Campaign headline or creative title"
          },
          "creativeCopy": {
            "type": "string",
            "description": "Full creative script, caption, or ad copy"
          },
          "landingUrl": {
            "type": "string",
            "description": "CTA destination landing page URL"
          },
          "payoutAddress": {
            "type": "string",
            "description": "Creator / publisher payout EVM or Solana wallet address"
          },
          "spendAmountUsdc": {
            "type": "number",
            "description": "Campaign payout / escrow amount in USDC"
          },
          "impressions": {
            "type": "number",
            "description": "Billable impression count (optional)"
          },
          "cpmUsd": {
            "type": "number",
            "description": "Agreed CPM rate in USD (optional)"
          },
          "statedTotalUsd": {
            "type": "number",
            "description": "Invoiced insertion-order total in USD"
          },
          "aiGenerated": {
            "type": "boolean",
            "description": "Whether creative contains synthetic / AI media"
          },
          "aiDisclosurePresent": {
            "type": "boolean",
            "description": "Explicit AI disclosure flag (optional)"
          },
          "sponsoredDisclosurePresent": {
            "type": "boolean",
            "description": "Explicit #ad / Paid Partnership flag (optional)"
          }
        },
        "required": [
          "advertiserName",
          "creativeCopy",
          "spendAmountUsdc"
        ]
      }
    },
    {
      "name": "scan_url_verdict",
      "description": "URL_SCAN_VERDICT: Scan a URL across FakeWatch/ScamSniffer typosquatting heuristics and Abuse.ch URLhaus threat feeds.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "description": "URL to scan for phishing or malware."
          }
        },
        "required": [
          "url"
        ]
      }
    },
    {
      "name": "check_threat_indicator",
      "description": "THREAT_INTELLIGENCE_INDICATOR: Correlate IPv4, domain, file hash, CVE, or wallet address against CISA KEV, URLhaus, FakeWatch, and OFAC SDN.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "indicator": {
            "type": "string",
            "description": "IP, domain, URL, hash, CVE, or wallet address."
          }
        },
        "required": [
          "indicator"
        ]
      }
    },
    {
      "name": "assess_transaction_risk",
      "description": "TRANSACTION_RISK_GENERAL: Evaluate EVM transaction hash calldata (unlimited ERC-20 approve, setApprovalForAll, permit), counterparty SDN, and drainer risk.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "transaction": {
            "type": "string",
            "description": "Transaction hash (0x...) or description."
          },
          "chain": {
            "type": "string",
            "description": "Optional chain name."
          }
        },
        "required": [
          "transaction"
        ]
      }
    },
    {
      "name": "verify_ssl_certificate",
      "description": "SSL_VERIFICATION_CERT: Perform live TLS handshake to verify certificate trust, issuer, expiry, and days remaining.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "host": {
            "type": "string",
            "description": "Hostname to verify (e.g. \"praman-desk.vercel.app\")."
          }
        },
        "required": [
          "host"
        ]
      }
    },
    {
      "name": "lookup_cve_cvss",
      "description": "CVE_LOOKUP_CVSS: Look up official CVSS base score, severity, description, and references via NIST NVD v2 and MITRE CVE AWG.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "cve_id": {
            "type": "string",
            "description": "CVE identifier (e.g. \"CVE-2024-3094\")."
          }
        },
        "required": [
          "cve_id"
        ]
      }
    },
    {
      "name": "assess_shipment_delay_risk",
      "description": "SHIPMENT_DELAY_RISK_GENERAL: Assess maritime/port logistics delay probability using live Open-Meteo port weather and Red Sea/Panama corridor signals.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "shipment": {
            "type": "string",
            "description": "Shipment route, port, or tracking details."
          }
        },
        "required": [
          "shipment"
        ]
      }
    },
    {
      "name": "geolocate_ip",
      "description": "IP_GEOLOCATION_GENERAL: Resolve country, city, latitude, longitude, and ISP/ASN for any public IP address.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "ip": {
            "type": "string",
            "description": "IPv4 or IPv6 address."
          }
        },
        "required": [
          "ip"
        ]
      }
    },
    {
      "name": "get_token_holder_count",
      "description": "TOKEN_HOLDER_COUNT_GENERAL: Retrieve live token holder count and symbol across Ethereum, Base, Arbitrum, Optimism, Polygon, and Sepolia via Blockscout/Ethplorer.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string",
            "description": "Token contract address or symbol."
          },
          "chain": {
            "type": "string",
            "description": "Blockchain name.",
            "default": "ethereum"
          }
        },
        "required": [
          "token"
        ]
      }
    },
    {
      "name": "detect_wash_trading",
      "description": "WASH_TRADING_DETECTION_GENERAL: Detect synthetic DEX turnover ratio, buy/sell symmetry, and shallow-pool churning via DexScreener.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "subject": {
            "type": "string",
            "description": "Token symbol, address, or DEX pair."
          }
        },
        "required": [
          "subject"
        ]
      }
    },
    {
      "name": "answer_telegraph_knowledge",
      "description": "TELEGRAPH_KNOWLEDGE_GENERAL: Answer Telegraph Protocol architecture/contract questions and general queries with grounded sources and <=80 char brief.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "question": {
            "type": "string",
            "description": "Question to answer."
          }
        },
        "required": [
          "question"
        ]
      }
    }
  ]
}