Skip to main content
Glama

CoinRithm Agent Trading

Open futures position

open_futures_position
Idempotent

Open (or add to) a mock futures position. Requires the trade:futures scope. Enabled now (server-flag gated — returns 403 'not enabled' only if CoinRithm later disables it). idempotencyKey is REQUIRED and must be unique per intent. leverage 1-20, marginMusd >= 10. Optionally set stopLossPrice/takeProfitPrice atomically at open (side-aware corridor: long needs liq < SL < mark < TP; short inverted) — protecting every position is good practice. Quote first and CONFIRM with the user. Paper trading only (virtual mUSD). Fills follow paper_execution_v1 with a disclosed execution cost; see executionModel in quote/trade results.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sideYesFutures direction: long benefits if price rises; short benefits if price falls.
coinIdYesCoin UCID to open futures for. Use resolve_symbol first.
leverageYesLeverage multiplier (1-20x).
agentTraceNoOptional private trace metadata stored in the caller's ledger.
marginMusdYesIsolated margin in mUSD (>= 10).
stopLossPriceNoOptional resting stop-loss set atomically at open (USD trigger; fired by the per-minute worker).
idempotencyKeyYesUnique per intent; reuse replays the original result.
takeProfitPriceNoOptional resting take-profit set atomically at open (USD trigger; fired by the per-minute worker).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYes
bodyNo
httpStatusYes
ledgerStatusNo
ledgerEventIdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • removedOutput schema / properties / body / description
      Removed value: -"Parsed CoinRithm response body, or raw text when the response is not JSON."
    • removedOutput schema / properties / httpStatus / description
      Removed value: -"HTTP status returned by CoinRithm, or 0 for network errors."
    • removedOutput schema / properties / ledgerEventId / description
      Removed value: -"Private AgentActionEvent id returned by /api/agent/*, when present."
    • removedOutput schema / properties / ledgerStatus / description
      Removed value: -"Ledger write status header returned by CoinRithm, when present."
    • removedOutput schema / properties / ok / description
      Removed value: -"True when CoinRithm returned a successful 2xx response."
  2. Changed3 schema fields changed
    • addedInput schema / properties / agentTrace
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Optional private trace metadata stored in the caller's ledger.",
      +  "properties": {
      +    "confidence": {
      +      "description": "Optional confidence score from 0 to 1.",
      +      "maximum": 1,
      +      "minimum": 0,
      +      "type": "number"
      +    },
      +    "decisionId": {
      +      "description": "Agent decision id for quote/write attribution.",
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "rationaleSummary": {
      +      "description": "Optional concise rationale summary. Do not include chain-of-thought, secrets, or account identity.",
      +      "maxLength": 1200,
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "runId": {
      +      "description": "Agent run id for grouping.",
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "strategyLabel": {
      +      "description": "Short strategy label, self-reported by the caller.",
      +      "maxLength": 120,
      +      "minLength": 1,
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
    • addedOutput schema / properties / ledgerEventId
      Added value: +{
      +  "description": "Private AgentActionEvent id returned by /api/agent/*, when present.",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / ledgerStatus
      Added value: +{
      +  "description": "Ledger write status header returned by CoinRithm, when present.",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
  3. Changed2 schema fields changed
    • addedInput schema / properties / stopLossPrice
      Added value: +{
      +  "description": "Optional resting stop-loss set atomically at open (USD trigger; fired by the per-minute worker).",
      +  "exclusiveMinimum": 0,
      +  "type": "number"
      +}
    • addedInput schema / properties / takeProfitPrice
      Added value: +{
      +  "description": "Optional resting take-profit set atomically at open (USD trigger; fired by the per-minute worker).",
      +  "exclusiveMinimum": 0,
      +  "type": "number"
      +}
  4. Changed5 schema fields changed
    • addedInput schema / properties / coinId / description
      Added value: +"Coin UCID to open futures for. Use resolve_symbol first."
    • addedInput schema / properties / leverage / description
      Added value: +"Leverage multiplier (1-20x)."
    • addedInput schema / properties / marginMusd / description
      Added value: +"Isolated margin in mUSD (>= 10)."
    • addedInput schema / properties / side / description
      Added value: +"Futures direction: long benefits if price rises; short benefits if price falls."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "body": {
      +      "description": "Parsed CoinRithm response body, or raw text when the response is not JSON."
      +    },
      +    "httpStatus": {
      +      "description": "HTTP status returned by CoinRithm, or 0 for network errors.",
      +      "type": "integer"
      +    },
      +    "ok": {
      +      "description": "True when CoinRithm returned a successful 2xx response.",
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "httpStatus",
      +    "ok"
      +  ],
      +  "type": "object"
      +}
  5. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Adds substantial context beyond the annotations (which already cover idempotent/destructive/readOnly): trade:futures scope requirement, the 403 'not enabled' behavior, mandatory idempotency key uniqueness, the paper_execution_v1 fill model with disclosed execution cost, and the side-aware SL/TP corridor rules (long needs liq < SL < mark < TP). This is rich behavioral disclosure for a mutation tool.

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?

Front-loaded with the core action and requirement, then constraints and workflow. Dense but each sentence carries information (scope, gating, idempotency, corridors, execution model); slightly long with a parenthetical that could trim.

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?

An output schema exists, so return values need not be explained. Given 8 params (one nested), auth requirements, idempotency semantics, risk corridor rules, and the paper execution model are all covered, the description is complete for correct invocation.

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 baseline is 3, but the description adds real semantic value: the side-aware SL/TP corridor constraint, the leverage 1-20 and marginMusd >= 10 bounds, and the emphasis that idempotencyKey must be unique per intent. These go beyond the schema's field-level descriptions.

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?

States a specific verb and resource ('Open (or add to) a mock futures position') and immediately signals the mock/paper nature. This clearly distinguishes it from siblings like place_spot_order, open_pm_position, and close_futures_position.

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 an explicit workflow directive ('Quote first and CONFIRM with the user') and states the required scope plus the server-flag gating condition. It does not explicitly name the futures_quote sibling, but the sequencing instruction is clear enough for correct selection.

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.

Resources