Skip to main content
Glama

quant_risk

Quantitative trading risk and liquidation calculator for perp/margin DEX agents: calculates exact liquidation price, stop-loss price, margin buffer and risk rating for long or short positions with fee and maintenance margin awareness. Price: 0.001 USDC per call over x402 on Base or Solana.

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": "quant_risk"
  }
}

Input Schema

NameRequiredDescriptionDefault
sideNoExample: long
entryNoExample: 100
leverageNoExample: 10

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It does disclose useful behavior—fee and maintenance margin awareness, and the paid x402 model at 0.001 USDC per call on Base or Solana—but it omits whether the call is read-only/side-effect free, how errors or missing inputs are handled, and what the response shape looks like.

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?

Two tightly written sentences: capability and outputs front-loaded, cost and payment rails second. No filler or redundant restatement of the tool name.

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

Completeness3/5

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

There is no output schema or annotation coverage, so the description must do most of the work; it names the outputs but not their format, and it does not address why every parameter is optional in a calculator that cannot function without them. Adequate to attempt a call, but incomplete for confident invocation.

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

Parameters3/5

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

Schema coverage is nominally 100%, so the baseline is 3; however the schema descriptions are only examples ('Example: long', 'Example: 10'), adding little real semantics. The description contributes marginal meaning by indicating side is long/short and that leverage/entry drive the calculation, but it never clarifies units, acceptable ranges, or that all three parameters are optional yet effectively required.

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?

The description names a specific verb+resource ('quantitative trading risk and liquidation calculator') and enumerates concrete outputs: exact liquidation price, stop-loss price, margin buffer and risk rating, scoped to long/short positions. It is clearly distinct from risk_portfolio and risk_token in domain, though it does not explicitly state that differentiation.

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

Usage Guidelines3/5

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

Usage is implied by the audience statement ('for perp/margin DEX agents') and the position framing, but there is no explicit when-to-use / when-not-to-use guidance and no pointer to alternatives like risk_portfolio for account-level exposure. The agent must infer whether this is the right tool for a given risk question.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.