Skip to main content
Glama
CoinRithm

CoinRithm/coinrithm-agent-trading

Official

Close futures position

close_futures_position
DestructiveIdempotent

Close or partially reduce a simulated futures position. Use fraction (0,1] for partial close, or omit for full close. IdempotencyKey required for safe replay.

Instructions

Close or partially reduce a mock futures position. fraction in (0,1] reduces partially; omit (or 1) for a full close. idempotencyKey is REQUIRED. Requires the trade:futures scope. Paper trading only — virtual funds (50,000 mUSD). Not financial advice.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
positionIdYesOpen futures position id to close or reduce.
fractionNo(0,1] portion to close; omit/1 = full close.
idempotencyKeyYesUnique per close intent; reuse replays the original result.
agentTraceNoOptional private trace metadata stored in the caller's ledger.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
httpStatusYesHTTP status returned by CoinRithm, or 0 for network errors.
okYesTrue when CoinRithm returned a successful 2xx response.
ledgerEventIdNoPrivate AgentActionEvent id returned by /api/agent/*, when present.
ledgerStatusNoLedger write status header returned by CoinRithm, when present.
bodyNoParsed CoinRithm response body, or raw text when the response is not JSON.
Behavior5/5

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

Annotations already provide destructiveHint=true and idempotentHint=true. The description adds crucial context: paper trading only, virtual funds, requires trade:futures scope, and that idempotencyKey is REQUIRED, enhancing transparency beyond annotations without contradiction.

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 extremely concise with two sentences that front-load the purpose. Every sentence adds value, no wasted words.

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 parameter count, annotations, and existence of output schema, the description is complete. It covers purpose, partial close, required scope, idempotency, and the paper trading nature, leaving no critical gaps.

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% with detailed descriptions. The description adds semantic value by explaining fraction's meaning (omit or 1 for full close) and emphasizing idempotencyKey's requirement, complementing the schema.

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 'Close or partially reduce a mock futures position', providing a specific verb and resource. It distinguishes from siblings like open_futures_position and set_futures_sl_tp by explicitly focusing on closing positions.

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 explains when to use the tool (to close or reduce), how to perform partial close via fraction, and that idempotencyKey is required. It includes scope and paper trading constraints. However, it does not explicitly state when not to use or provide alternatives, but the context is clear enough for an AI agent.

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/CoinRithm/coinrithm-agent-trading'

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