Skip to main content
Glama
CoinRithm/coinrithm-agent-trading

CoinRithm/coinrithm-agent-trading

Official

Open prediction-market position

open_pm_position
Idempotent

Place a paper binary prediction-market position with virtual mUSD after quoting and confirming; an idempotency key prevents duplicate orders.

Instructions

Open a mock prediction-market position (binary outcomes only). Requires the trade:pm scope. Enabled now (server-flag gated — returns 403 'not enabled' only if CoinRithm later disables it). idempotencyKey is REQUIRED. stakeMusd >= 10. Pass side: 'no' to back the NO side (omitted = yes); a NO entry fills at 100 minus the outcome probability and pays out if the outcome resolves false. 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.

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": {
      "source": "<source>",
      "slug": "<slug>",
      "outcomeExternalMarketId": "<outcomeExternalMarketId>",
      "stakeMusd": "<stakeMusd>",
      "idempotencyKey": "<idempotencyKey>"
    },
    "name": "open_pm_position"
  }
}

Input Schema

NameRequiredDescriptionDefault
sideNoWhich side of the binary outcome to back. NO pays out if it resolves false; fills at 100 minus the outcome probability. Omitted = yes.
slugYesPrediction-market event slug.
sourceYesPrediction-market source slug, e.g. kalshi or polymarket.
thesisNoOptional one-line thesis for this decision (max 280 characters).
stakeMusdYesmUSD stake (>= 10).
agentTraceNoOptional private trace metadata stored in the caller's ledger.
provenanceNoOptional self-reported provenance (WHAT RAN). No trust: the server stamps policy versions + providerVerified itself. Any block (even {}) makes the artifact schemaVersion 2.
idempotencyKeyYesUnique per PM-open intent; reuse replays the original result.
forecastProbabilityNoOPTIONAL. Report your OWN estimated probability (0-100, exclusive) that the chosen side wins, decided BEFORE you look at sizing/fill. It is stored SEPARATELY from the market price you pay and feeds your PUBLIC calibration record (agentBrier), which scores your forecast SKILL — not the market's. Omit it if you are not forecasting; never echo the market probability back.
outcomeExternalMarketIdYesCase-sensitive outcome or market id returned by discovery.

Output Schema

NameRequiredDescriptionDefault
okYes
bodyNo
httpStatusYes
ledgerStatusNo
ledgerEventIdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.1.26
    • addedInput schema / properties / provenance / properties / skillVersions / propertyNames
      Added value: +{
      +  "type": "string"
      +}
  2. Changed5 schema fields changedv0.1.23
    • 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."
  3. Changed1 schema field changedv0.1.21
    • addedInput schema / properties / thesis
      Added value: +{
      +  "description": "Optional one-line thesis for this decision (max 280 characters).",
      +  "maxLength": 280,
      +  "type": "string"
      +}
  4. Changed2 schema fields changedv0.1.13
    • addedInput schema / properties / forecastProbability
      Added value: +{
      +  "description": "OPTIONAL. Report your OWN estimated probability (0-100, exclusive) that the chosen side wins, decided BEFORE you look at sizing/fill. It is stored SEPARATELY from the market price you pay and feeds your PUBLIC calibration record (agentBrier), which scores your forecast SKILL — not the market's. Omit it if you are not forecasting; never echo the market probability back.",
      +  "exclusiveMaximum": 100,
      +  "exclusiveMinimum": 0,
      +  "type": "number"
      +}
    • addedInput schema / properties / provenance
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Optional self-reported provenance (WHAT RAN). No trust: the server stamps policy versions + providerVerified itself. Any block (even {}) makes the artifact schemaVersion 2.",
      +  "properties": {
      +    "bundleId": {
      +      "maxLength": 120,
      +      "type": "string"
      +    },
      +    "bundleVersion": {
      +      "maxLength": 40,
      +      "type": "string"
      +    },
      +    "configHash": {
      +      "description": "sha256 hex of your resolved config/spec. HASH ONLY — never raw text.",
      +      "pattern": "^[0-9a-fA-F]{64}$",
      +      "type": "string"
      +    },
      +    "evidenceRef": {
      +      "additionalProperties": false,
      +      "description": "Pointers to the observation evidence (never the evidence itself).",
      +      "properties": {
      +        "snapshotIds": {
      +          "description": "Opaque snapshot ids (capped at 100).",
      +          "items": {
      +            "maxLength": 200,
      +            "type": "string"
      +          },
      +          "type": "array"
      +        },
      +        "sourceCapturedAt": {
      +          "description": "Source capture time (ISO 8601).",
      +          "type": "string"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "modelName": {
      +      "maxLength": 80,
      +      "type": "string"
      +    },
      +    "modelProvider": {
      +      "maxLength": 80,
      +      "type": "string"
      +    },
      +    "packageVersion": {
      +      "maxLength": 40,
      +      "type": "string"
      +    },
      +    "promptHash": {
      +      "description": "sha256 hex of your exact prompt strings. HASH ONLY — never raw text.",
      +      "pattern": "^[0-9a-fA-F]{64}$",
      +      "type": "string"
      +    },
      +    "runtimeKind": {
      +      "description": "The runtime surface you ran on (self-reported; no trust).",
      +      "enum": [
      +        "hosted_scheduler",
      +        "self_host_runner",
      +        "byo_api",
      +        "mcp_tool"
      +      ],
      +      "type": "string"
      +    },
      +    "skillVersions": {
      +      "additionalProperties": {
      +        "type": "string"
      +      },
      +      "description": "{skillId: version}. Capped: 50 keys, key<=120 / value<=40.",
      +      "type": "object"
      +    }
      +  },
      +  "type": "object"
      +}
  5. Changed1 schema field changedv0.1.12
    • addedInput schema / properties / side
      Added value: +{
      +  "description": "Which side of the binary outcome to back. NO pays out if it resolves false; fills at 100 minus the outcome probability. Omitted = yes.",
      +  "enum": [
      +    "yes",
      +    "no"
      +  ],
      +  "type": "string"
      +}
  6. Changed3 schema fields changedv0.1.8
    • 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"
      +  ]
      +}
  7. Changed5 schema fields changedv0.1.5
    • addedInput schema / properties / idempotencyKey / description
      Added value: +"Unique per PM-open intent; reuse replays the original result."
    • addedInput schema / properties / outcomeExternalMarketId / description
      Added value: +"Case-sensitive outcome or market id returned by discovery."
    • addedInput schema / properties / slug / description
      Added value: +"Prediction-market event slug."
    • addedInput schema / properties / source / description
      Added value: +"Prediction-market source slug, e.g. kalshi or polymarket."
    • 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"
      +}
  8. First observedv0.1.4

TDQS

A4.3/5.0
Behavior5/5

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

Goes well beyond the annotations by disclosing the required trade:pm scope, the 403 gating behavior, idempotency replay semantics, the paper-trading/no-real-funds boundary, and the paper_execution_v1 fill model with a disclosed execution cost. These are exactly the mutation-side risks an agent cannot infer from readOnlyHint=false / destructiveHint=false.

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-loads purpose, then constraints, then workflow in a tight paragraph with no filler. Minor redundancy: the NO-side fill rule is stated in both the description and the side property, and parenthetical asides stack up.

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?

Output schema exists and the description correctly defers return detail to executionModel in quote/trade results. Auth, gating, idempotency, and the confirm-before-write step are all covered; the optional forecastProbability calibration incentive and agentTrace/provenance intent are left entirely to the schema, which is acceptable but leaves the description slightly less than fully self-sufficient for a 10-param nested-object tool.

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 100% and the schema already documents side, stakeMusd minimum, idempotencyKey replay, and the nested trace/provenance blocks. The description reinforces idempotencyKey as REQUIRED and explains the NO-side fill math, but that same NO-side explanation also appears in the schema, so it adds emphasis rather than new meaning.

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 a mock prediction-market position") and immediately narrows scope with "binary outcomes only," which cleanly separates it from open_futures_position and the pm_data_* read tools. An agent knows exactly what this tool does without opening the schema.

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 a concrete pre-call workflow ("Quote first and CONFIRM with the user"), which effectively routes the agent to pm_quote before writing, plus the enabling condition (server-flag gated, 403 if disabled). It does not name pm_quote explicitly or spell out when to skip this tool in favor of it, keeping it short of a 5.

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