run_token_audit

Triggers a deep multi-module audit of a token contract. Returns a complete risk report immediately if a cached result exists, otherwise queues an audit job and returns a job_id. Use get_token_audit_result to poll for completion when the audit is queued.

MCP Endpoint: https://prediction.mcp.chainaware.ai/sse


Supported Networks

Important: Token audit tools use lowercase network identifiers - different from predictive_fraud and predictive_rug_pull which use uppercase.

Identifier Network
eth Ethereum
bsc BNB Smart Chain
base Base
arbitrum Arbitrum
avalanche Avalanche
optimism Optimism
polygon Polygon

Workflow

run_token_audit is a get-or-create call:

run_token_audit
  → if audit_status == "complete"  → full result returned immediately (no second call needed)
  → if status == "queued"          → poll get_token_audit_result until audit_status == "complete"

Input Schema

Field Type Required Description
contract_address string Yes Token contract address to audit
network string Yes Lowercase network identifier (e.g. eth, bsc)

Output Schema - Two Possible Shapes

Shape A - Cached result (audit_status: "complete"):

Returns the full risk report. Same schema as get_token_audit_result. Respond to the user directly - no second call needed.

Shape B - New audit queued:

{
  "contract_address": "string",
  "chain": "string",
  "job_id": "string",
  "status": "queued",
  "message": "string"
}

Store the job_id and begin polling get_token_audit_result with the same contract_address and network.


Code Examples

Node.js

const audit = await client.callTool({
  name: "run_token_audit",
  arguments: {
    contract_address: "0xContractAddressHere",
    network: "eth"
  }
});

if (audit.audit_status === "complete") {
  // Cached result - answer immediately
  console.log("Risk score:", audit.aggregate.risk_score);
  console.log("Verdict:", audit.aggregate.verdict);
} else {
  // Queued - store job_id and poll get_token_audit_result
  console.log("Audit queued, job_id:", audit.job_id);
}

Python

audit = await session.call_tool("run_token_audit", {
    "contract_address": "0xContractAddressHere",
    "network": "eth"
})

if audit.get("audit_status") == "complete":
    print("Risk score:", audit["aggregate"]["risk_score"])
    print("Verdict:", audit["aggregate"]["verdict"])
else:
    print("Queued, job_id:", audit["job_id"])

Example Agent Prompts

Audit this token contract: 0xContractAddress... on Ethereum
Is this BSC token safe? 0xContract...
Run a risk scan on this contract before I buy
Check if this address is a honeypot: 0x... on Base
Does this contract have hidden mint functions? 0x... on Arbitrum
Is liquidity locked for this token on Polygon?

Use Cases

  • Launchpads - block high-risk contracts before listing
  • DEXes - auto-scan new pools; surface risk score in the UI
  • Wallets - warn users before they approve or buy a risky token
  • Investors - due diligence before entering a position
  • DeFi aggregators - exclude high-risk tokens from yield routing

Error Codes

Code Meaning
400 Malformed contract_address or network
500 Temporary backend failure - retry after a short delay


Further Reading


See also: get_token_audit_result | Prediction MCP Overview | Setup Guide