backend
Deterministic pre-trade risk checks for autonomous AI trading agents.
사용해야 할까요
품질 및 안전성
도구 정의와 프로토콜 준수에 대한 자동 분석을 기반으로 합니다.
컨텍스트 비용
이는 서버의 도구가 모델의 컨텍스트에 로드될 때마다 소비되는 대략적인 토큰 수입니다. 수치가 높을수록 다른 작업에 사용할 수 있는 주의가 줄어듭니다.
설치
원클릭 설치
`claude_desktop_config.json` 파일에 다음을 추가하세요:
{
"mcpServers": {
"backend": {
"url": "https://backendai-x4m1.onrender.com/mcp-http/mcp"
}
}
}원격 엔드포인트
https://backendai-x4m1.onrender.com/mcp-http/mcpstreamable-httphttps://api.collarguardrail.com/mcp-http/mcpstreamable-http할 수 있는 일
도구 목록
도구 (6)
🟢evaluate_trade(wallet, asset, contract_address, side, amount, ...)
Pre-trade risk check for a proposed trade. Call this BEFORE executing any trade and treat a "deny" decision as a hard stop. Evaluated at a fixed Tier 1 ceiling ($5,000 notional). For higher limits, use `evaluate_trade_paid` (Tier 2, $25,000) which settles an x402 payment on-chain.
입력 스키마
{
"type": "object",
"properties": {
"wallet": {
"type": "string",
"description": "EVM wallet address (0x...) the trade would execute from."
},
"asset": {
"type": "string",
"description": "Asset symbol, e.g. NVDA, AAPL, TSLA, USDG."
},
"contract_address": {
"type": "string",
"description": "Token contract address (0x...). Must match the\nofficial registry address for that symbol, or the trade is\ndenied as a suspected fake token."
},
"side": {
"type": "string",
"description": "\"buy\" or \"sell\"."
},
"amount": {
"type": "number",
"description": "Quantity in token units — NOT a pre-computed USD value."
},
"max_slippage_bps": {
"default": 100,
"type": "integer",
"description": "Max slippage in basis points (default 100)."
},
"request_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional idempotency key."
}
},
"required": [
"wallet",
"asset",
"contract_address",
"side",
"amount"
],
"additionalProperties": false
}출력 스키마
{
"type": "object",
"properties": {
"decision": {
"description": "Final verdict. 'deny' is a hard stop.",
"enum": [
"allow",
"warn",
"deny"
],
"type": "string"
},
"reasons": {
"description": "Human-readable reasons. Entries prefixed with 'ADVISORY:' are non-blocking context; all other entries drove the decision.",
"items": {
"type": "string"
},
"type": "array"
},
"tier": {
"description": "Tier the wallet was evaluated at (1-3).",
"type": "integer"
},
"max_trade_usd": {
"description": "USD ceiling for this tier.",
"type": "number"
},
"calculated_notional_usd": {
"description": "USD value of the proposed trade.",
"type": "number"
},
"price_usd": {
"description": "Asset price used for the valuation.",
"type": "number"
},
"price_source": {
"description": "Where the price came from.",
"enum": [
"oracle",
"uniswap_v4",
"fallback_default",
"unavailable"
],
"type": "string"
},
"risk_score": {
"description": "Composite risk score from 0 (safe) to 100 (blocked).",
"type": "integer"
},
"request_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Echoed idempotency key, if provided."
},
"audit_hash": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "SHA-256 hash chaining this decision."
},
"audit_seq": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Monotonic sequence number of this decision."
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "If present, no verdict was produced. Treat as a hard stop; do not execute the trade."
}
},
"required": [
"decision",
"reasons",
"tier",
"max_trade_usd",
"calculated_notional_usd",
"price_usd",
"price_source",
"risk_score"
],
"description": "Result of a pre-trade risk check."
}🟢evaluate_trade_paid(wallet, asset, contract_address, side, amount, ...)
Pre-trade risk check gated by an x402 payment. Evaluated as COLR Tier 2: $25,000 notional ceiling, 10/25 per-minute rate limits. No COLR holdings are required — the on-chain payment is the credential. FLOW ---- 1. Call WITHOUT payment_proof → the tool returns a `PaymentRequiredOutput` describing the on-chain payment (network, asset, amount, payTo, resource). 2. Settle the payment on-chain using an x402-capable client. The facilitator returns a proof string. 3. Call again with `payment_proof=<proof>` → the tool forwards the proof to the guardrail's x402-paid endpoint and returns a full `EvaluateTradeOutput` with `tier=2`.
입력 스키마
{
"type": "object",
"properties": {
"wallet": {
"type": "string",
"description": "EVM wallet address (0x...) the trade would execute from."
},
"asset": {
"type": "string",
"description": "Asset symbol, e.g. NVDA, AAPL, TSLA, USDG."
},
"contract_address": {
"type": "string",
"description": "Token contract address (0x...)."
},
"side": {
"type": "string",
"description": "\"buy\" or \"sell\"."
},
"amount": {
"type": "number",
"description": "Quantity in token units."
},
"max_slippage_bps": {
"default": 100,
"type": "integer",
"description": "Max slippage in basis points (default 100)."
},
"request_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional idempotency key."
},
"payment_proof": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "x402 payment proof from the facilitator. Omit\non the first call to receive the payment challenge."
}
},
"required": [
"wallet",
"asset",
"contract_address",
"side",
"amount"
],
"additionalProperties": false
}출력 스키마
{
"type": "object",
"properties": {
"result": {
"anyOf": [
{
"description": "Result of a pre-trade risk check.",
"properties": {
"decision": {
"description": "Final verdict. 'deny' is a hard stop.",
"enum": [
"allow",
"warn",
"deny"
],
"type": "string"
},
"reasons": {
"description": "Human-readable reasons. Entries prefixed with 'ADVISORY:' are non-blocking context; all other entries drove the decision.",
"items": {
"type": "string"
},
"type": "array"
},
"tier": {
"description": "Tier the wallet was evaluated at (1-3).",
"type": "integer"
},
"max_trade_usd": {
"description": "USD ceiling for this tier.",
"type": "number"
},
"calculated_notional_usd": {
"description": "USD value of the proposed trade.",
"type": "number"
},
"price_usd": {
"description": "Asset price used for the valuation.",
"type": "number"
},
"price_source": {
"description": "Where the price came from.",
"enum": [
"oracle",
"uniswap_v4",
"fallback_default",
"unavailable"
],
"type": "string"
},
"risk_score": {
"description": "Composite risk score from 0 (safe) to 100 (blocked).",
"type": "integer"
},
"request_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Echoed idempotency key, if provided."
},
"audit_hash": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "SHA-256 hash chaining this decision."
},
"audit_seq": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Monotonic sequence number of this decision."
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "If present, no verdict was produced. Treat as a hard stop; do not execute the trade."
}
},
"required": [
"decision",
"reasons",
"tier",
"max_trade_usd",
"calculated_notional_usd",
"price_usd",
"price_source",
"risk_score"
],
"type": "object"
},
{
"description": "x402 payment challenge returned when no proof is supplied.\n\nThe client is expected to settle this payment on-chain and retry the\ntool with the resulting proof carried in `payment_proof`.",
"properties": {
"status": {
"const": "payment_required",
"default": "payment_required",
"type": "string"
},
"network": {
"description": "CAIP-2 network id, e.g. eip155:4663.",
"type": "string"
},
"asset": {
"description": "USDG contract address.",
"type": "string"
},
"amount": {
"description": "Amount in asset base units (6 decimals for USDG).",
"type": "string"
},
"pay_to": {
"description": "Recipient address for the payment.",
"type": "string"
},
"resource": {
"description": "Resource URL the payment unlocks.",
"type": "string"
},
"description": {
"description": "Human-readable purpose.",
"type": "string"
},
"max_timeout_seconds": {
"description": "Payment validity window in seconds.",
"type": "integer"
},
"tier_granted": {
"description": "Tier the paid proof grants (2 for x402 paid access).",
"type": "integer"
},
"error": {
"default": null,
"type": "null"
}
},
"required": [
"network",
"asset",
"amount",
"pay_to",
"resource",
"description",
"max_timeout_seconds",
"tier_granted"
],
"type": "object"
}
]
}
},
"required": [
"result"
],
"x-fastmcp-wrap-result": true
}🟢check_token_safety(contract_address)
Honeypot / contract safety check for any ERC-20 token.
입력 스키마
{
"type": "object",
"properties": {
"contract_address": {
"type": "string",
"description": "Token contract address (0x...)."
}
},
"required": [
"contract_address"
],
"additionalProperties": false
}출력 스키마
{
"type": "object",
"properties": {
"severity": {
"description": "Overall classification.",
"enum": [
"safe",
"warn",
"danger"
],
"type": "string"
},
"risk_factors": {
"description": "Specific issues detected.",
"items": {
"type": "string"
},
"type": "array"
},
"sell_simulation_ok": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether a simulated sell succeeded."
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "If present, the check failed. Do not assume 'safe'."
}
},
"required": [
"severity"
],
"description": "Heuristic honeypot / contract safety report."
}🟢simulate_balance(token_address, holder, delta, decimals)
Simulate a wallet's ERC-20 balance after a hypothetical trade using eth_call state override. Read-only: no transaction is ever sent.
입력 스키마
{
"type": "object",
"properties": {
"token_address": {
"type": "string",
"description": "ERC-20 contract address (0x...)."
},
"holder": {
"type": "string",
"description": "Wallet address whose balance is simulated (0x...)."
},
"delta": {
"type": "number",
"description": "Signed amount (negative = spend)."
},
"decimals": {
"default": 18,
"type": "integer",
"description": "Token decimals (default 18)."
}
},
"required": [
"token_address",
"holder",
"delta"
],
"additionalProperties": false
}출력 스키마
{
"type": "object",
"properties": {
"before": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Balance before."
},
"after": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Balance after."
},
"delta": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Signed change."
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "If present, the simulation failed."
}
},
"description": "Result of an eth_call state-override balance simulation."
}🟢get_supported_assets
List every asset in the guardrail's official Robinhood Chain registry, with its canonical contract address.
입력 스키마
{
"type": "object",
"properties": {},
"additionalProperties": false
}출력 스키마
{
"type": "object",
"properties": {
"assets": {
"description": "Registered assets.",
"items": {
"properties": {
"symbol": {
"type": "string"
},
"contract_address": {
"type": "string"
},
"is_native": {
"default": false,
"type": "boolean"
}
},
"required": [
"symbol",
"contract_address"
],
"type": "object"
},
"type": "array"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "If present, the registry was unreachable."
}
},
"description": "Response of the asset registry endpoint."
}🟢verify_audit_trail(wallet, limit)
Verify the tamper-evident audit trail for a wallet's past guardrail decisions.
입력 스키마
{
"type": "object",
"properties": {
"wallet": {
"type": "string",
"description": "EVM wallet address (0x...)."
},
"limit": {
"default": 100,
"type": "integer",
"description": "How many recent records to verify (1-1000, default 100)."
}
},
"required": [
"wallet"
],
"additionalProperties": false
}출력 스키마
{
"type": "object",
"properties": {
"healthy": {
"description": "True only if every record's hash matches and the chain is unbroken.",
"type": "boolean"
},
"records_checked": {
"default": 0,
"description": "Number of records verified.",
"type": "integer"
},
"first_broken_seq": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Sequence number of the first broken link, if any."
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "If present, verification could not run."
}
},
"required": [
"healthy"
],
"description": "Audit-chain verification result."
}커뮤니티
증거