Skip to main content
Glama

run_risk_sentinel

Read-onlyIdempotent

Check swap-route or manual health and net-edge risk within route capacity, returning risk reports, quote previews, flags, and halt decisions to prevent unsafe DeFi trades.

Instructions

[Capability: paid_ready; tier: pioneer_plus; API: /api/v1/agent/risk-sentinel; authority: /api/v1/agent/status] Check swap-route or manual health and net-edge risk within route capacity. Supply both chain IDs, both tokens, and input amount for quoted mode, which requests a provider preview and returns riskReport and quotePreview. Otherwise the manual result contains health, netEdge, flags, and shouldHalt. A halt can publish an authorized risk alert. This action grants no trading authority.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "run_risk_sentinel"
  }
}

Input Schema

NameRequiredDescriptionDefault
gasUsdNoEstimated gas in USD for a manual assessment.
toTokenNoERC-20 token contract address deployed on the corresponding chain. Do not pass a wallet/EOA; the token address and chain ID must match.
protocolNoOptional quoted-mode route provider, LI.FI or Relay.
slippageNoQuoted-mode tolerance in percentage points (0.5 means 0.5%).
fromTokenNoERC-20 token contract address deployed on the corresponding chain. Do not pass a wallet/EOA; the token address and chain ID must match.
toAddressNoOptional EVM destination recipient. Defaults to the supplied wallet if present.
toChainIdNoDestination EVM chain ID for quoted mode.
fromAmountNoInput token amount as an integer string in base units.
safetyModeNoRisk strictness mode for the quoted route assessment.
fromChainIdNoSource EVM chain ID for quoted mode.
bridgeFeeUsdNoEstimated bridge fee in USD for a manual assessment.
healthFactorNoCurrent lending health factor as a ratio.
riskBufferUsdNoAdditional modeled risk cost in USD.
walletAddressNoOptional EVM wallet for route context. Publishing halt alerts requires independent wallet authorization.
protocolFeeUsdNoEstimated protocol fees in USD for a manual assessment.
enforcePositiveNoTreat nonpositive or unknown net edge as a blocking risk when supported by the selected mode.
expectedUpsideUsdNoExpected gross upside in USD for net-edge analysis.
liquidationBufferPctNoEstimated headroom before liquidation in percentage points.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed16 schema fields changed
    • addedInput schema / properties / bridgeFeeUsd / description
      Added value: +"Estimated bridge fee in USD for a manual assessment."
    • addedInput schema / properties / enforcePositive / description
      Added value: +"Treat nonpositive or unknown net edge as a blocking risk when supported by the selected mode."
    • addedInput schema / properties / expectedUpsideUsd / description
      Added value: +"Expected gross upside in USD for net-edge analysis."
    • addedInput schema / properties / fromAmount / description
      Added value: +"Input token amount as an integer string in base units."
    • addedInput schema / properties / fromChainId / description
      Added value: +"Source EVM chain ID for quoted mode."
    • addedInput schema / properties / gasUsd / description
      Added value: +"Estimated gas in USD for a manual assessment."
    • addedInput schema / properties / healthFactor / description
      Added value: +"Current lending health factor as a ratio."
    • addedInput schema / properties / liquidationBufferPct / description
      Added value: +"Estimated headroom before liquidation in percentage points."
    • addedInput schema / properties / protocol / description
      Added value: +"Optional quoted-mode route provider, LI.FI or Relay."
    • addedInput schema / properties / protocolFeeUsd / description
      Added value: +"Estimated protocol fees in USD for a manual assessment."
    • addedInput schema / properties / riskBufferUsd / description
      Added value: +"Additional modeled risk cost in USD."
    • addedInput schema / properties / safetyMode / description
      Added value: +"Risk strictness mode for the quoted route assessment."
    • addedInput schema / properties / slippage / description
      Added value: +"Quoted-mode tolerance in percentage points (0.5 means 0.5%)."
    • addedInput schema / properties / toAddress / description
      Added value: +"Optional EVM destination recipient. Defaults to the supplied wallet if present."
    • addedInput schema / properties / toChainId / description
      Added value: +"Destination EVM chain ID for quoted mode."
    • addedInput schema / properties / walletAddress / description
      Added value: +"Optional EVM wallet for route context. Publishing halt alerts requires independent wallet authorization."
  2. First observedv5.0.0

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond the annotations it discloses that quoted mode triggers an external provider preview (consistent with openWorldHint=true) and lists the returned fields for each mode (riskReport/quotePreview vs health/netEdge/flags/shouldHalt). It also scopes the blast radius with 'This action grants no trading authority' and notes that a halt may publish an alert requiring independent authorization. The alert-publishing side effect sits slightly in tension with readOnlyHint=true, but the 'authorized' qualifier and the schema note about independent wallet authorization mitigate this.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Roughly four dense sentences, front-loaded with the verb and immediately followed by the mode split, with no filler. The bracketed capability/tier/API/authority prefix is metadata noise for an agent selecting a tool, but it is short and does not obscure the core instruction.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 18-parameter, zero-required tool with no output schema, the description does well by enumerating return fields for both modes and stating the authority boundary. It could still be clearer about which manual inputs (healthFactor, expectedUpsideUsd, gasUsd, fees) are expected together, since nothing is marked required.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 18 parameters at 100% schema coverage, the schema already documents each field, yet the description adds the crucial non-obvious mapping: which parameter combination selects quoted mode versus manual mode. It also labels the manual-only inputs implicitly (health, netEdge, flags, shouldHalt outputs) so the agent can tell the two call shapes apart, which the schema alone cannot convey.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: 'Check swap-route or manual health and net-edge risk within route capacity', and splits the tool into two clearly named modes (quoted vs manual). It does not differentiate itself from adjacent risk siblings such as simulate_transaction_risk or analyze_protocol_risk, so an agent must still infer which risk tool applies.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives concrete mode-selection conditions: 'Supply both chain IDs, both tokens, and input amount for quoted mode... Otherwise the manual result contains...'. That is clear when-to-use-this-mode guidance, but it offers no exclusions or comparison against the other risk-analysis tools, and nothing explains when a risk check should be skipped entirely.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools