Skip to main content
Glama
romudille-bit

AgentPay x402 — Economic-intelligence layer for AI Agents

pre_trade_check

Check if it's sane to long or short a symbol at a given size by analyzing liquidity, funding, crowding, and security risks in one call. Returns a clear ok/caution/avoid verdict with per-factor breakdown.

Instructions

One-call pre-trade sanity check: 'I want to long $X of SYMBOL — is now sane?' Combines live orderbook slippage at YOUR size, cross-exchange funding (carry cost), open-interest crowding, and optional contract security into a single ok/caution/avoid verdict with a per-factor breakdown. Replaces four API integrations and the judgment layer on top of them. Raw component data embedded so you can apply your own thresholds.

Use when: An agent (or human) is about to enter a position and wants one verdict covering liquidity, carry, crowding, and security — instead of four raw feeds plus its own synthesis. Returns: verdict (ok/caution/avoid), factors{liquidity,carry,crowding,security} each with level + reason, components{orderbook_depth,funding_rates,open_interest}, symbol, side, size_usd Example response: {"symbol": "ETH", "side": "long", "size_usd": 50000, "verdict": "caution", "factors": {"liquidity": {"level": "ok", "slippage_pct": 0.011, "bucket_usd": 50000, "reason": "fills within 0.011% of best ask"}, "carry": {"level": "caution", "median_funding_pct": 0.062, "annualized_pct": 67.9, "reason": "longs paying elevated funding"}, "crowding": {"level": "ok", "long_short_ratio": 1.4, "oi_change_24h_pct": 3.2, "reason": "positioning unremarkable"}, "security": {"level": "skipped", "reason": "no token_address provided"}}}

Price: $0.01 USDC per call

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sideNoTrade direction (funding carry is side-aware)long
symbolYesAsset to check, e.g. 'ETH', 'BTC', 'SOL'
size_usdNoIntended position size in USD (drives the slippage check)
token_addressNoOptional ERC-20 contract address — adds a GoPlus security scan
Behavior5/5

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

No annotations are provided, so the description fully carries the transparency burden. It discloses the cost ($0.01 per call), explains that the tool returns a verdict with per-factor breakdown and embeds raw component data, and mentions the optional security scan. No contradictions or hidden behaviors.

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

Conciseness5/5

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

The description is efficiently structured: a concise opening sentence defining the tool, a detailed breakdown of components, explicit usage context, a description of the return format, an example response, and pricing. Every sentence contributes value without unnecessary repetition.

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

Completeness5/5

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

Given the moderate complexity (combining four factors) and the absence of an output schema, the description provides a complete picture. It explains the purpose, when to use it, the exact return format via an example, and even the pricing. No gaps are evident.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3. The description adds meaning beyond the schema by explaining that size_usd drives the slippage check and token_address adds a security scan, and it provides an example response that illustrates parameter usage. This adds contextual value over the schema alone.

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

Purpose5/5

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

The description clearly states the tool is a one-call pre-trade sanity check combining multiple factors (liquidity, carry, crowding, security) into a verdict. It distinguishes from siblings by noting it replaces four separate API integrations and the judgment layer, giving it a unique value proposition.

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?

The description explicitly states 'Use when: An agent (or human) is about to enter a position and wants one verdict covering liquidity, carry, crowding, and security — instead of four raw feeds plus its own synthesis.' This provides clear context for when to use the tool, though it does not explicitly mention when not to use it or list alternatives.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/romudille-bit/agentpay'

If you have feedback or need assistance with the MCP directory API, please join our Discord server