Skip to main content
Glama
OKX Market Guard

OKX Market Guard

by mavis-codee

Alert check (stateless, read-only)

alert_check
Read-onlyIdempotent

Tests a one-shot threshold against current OKX public market data to verify a market condition without creating persistent alerts or accessing account credentials.

Instructions

Evaluate a one-shot threshold against the latest OKX public market data. No persistent alerts, no notifications, no writes. READ-ONLY: this tool only calls OKX public market REST. No API key, no order, no account access. Metrics last/high24h/low24h/changePercent24h/bidAskSpreadPct use the ticker; fundingRate needs a -SWAP instId; openInterest needs SWAP or FUTURES.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "instId": "<instId>",
      "metric": "<metric>",
      "op": "<op>",
      "threshold": "<threshold>"
    },
    "name": "alert_check"
  }
}

Input Schema

NameRequiredDescriptionDefault
opYesComparison operator.
instIdYesInstrument ID, e.g. BTC-USDT or BTC-USDT-SWAP.
metricYesWhich value to test.
thresholdYesNumeric threshold.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint, so the safety profile is covered. The description adds genuinely new behavior: no persistence, no notifications, single REST call to public endpoints, no API key or account access. The 'READ-ONLY / no writes / no order / no account' cluster partially restates the annotations, which keeps it off a 5.

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?

Purpose is front-loaded in the first sentence, followed by exclusions and then per-metric constraints — a logical progression with no filler. Slight redundancy in the 'no persistent alerts, no notifications, no writes' plus 'READ-ONLY... No API key, no order, no account access' overlap costs it a point.

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 a 4-required-param, enum-heavy tool with rich annotations, the description covers when to use it, what it does not do, and the metric-to-instrument mapping. The one real gap is the return value: with no output schema, an agent cannot tell whether a threshold evaluation yields a bare boolean or the compared value alongside the verdict.

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 description coverage is 100%, so the baseline would be 3. The description exceeds that by pairing metrics to instrument types — fundingRate needs a -SWAP instId, openInterest needs SWAP or FUTURES — a constraint the schema's generic 'BTC-USDT or BTC-USDT-SWAP' example does not express. It does not explain op/threshold semantics, but those are self-evident from their enums.

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: 'Evaluate a one-shot threshold against the latest OKX public market data.' The metric list (last/high24h/low24h/changePercent24h/bidAskSpreadPct/fundingRate/openInterest) makes clear it is an evaluation layer over the raw market data siblings, not a fetch tool. It stops short of naming funding_rate or market_ticker as the alternatives, so 4 rather than 5.

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 usage constraints: it is one-shot, not persistent, and fundingRate requires a -SWAP instId while openInterest requires SWAP or FUTURES. That is actionable guidance an agent needs before calling. What is missing is explicit routing against siblings — it never says to use market_ticker instead when you just want the raw value.

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