Skip to main content
Glama
Derive MCP Server

Derive MCP Server

by yashhsm

get_subaccount

Retrieves a subaccount snapshot—collaterals, orders, positions, margin, portfolio value—and shows margin_type so you can check standard vs portfolio margin before short-option strategies.

Instructions

Full subaccount snapshot: collaterals, open orders, positions, margin, portfolio value. IMPORTANT: Check margin_type field (SM = Standard Margin, PM/PM2 = Portfolio Margin). SM: short options require full naked margin, spreads NOT netted. Only long options and perps practical. PM/PM2: spreads are netted, credit spreads work, lower margin for hedged positions. Always check margin_type BEFORE planning any strategy involving short options.

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

Input Schema

NameRequiredDescriptionDefault
subaccount_idNoSubaccount ID (defaults to configured)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose the return surface (collaterals, orders, positions, margin, portfolio value) plus a non-obvious domain caveat that SM accounts do not net spreads while PM/PM2 do. It omits read-only framing, error behavior for an unknown subaccount_id, and any rate-limit or auth notes, but the margin_type disclosure is substantive context not available in any structured field.

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?

The return contents are front-loaded in one sentence, followed by the margin caveat. The margin block is long relative to the rest but every sentence is actionable domain information rather than filler, so it earns its space despite the length.

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?

There is no output schema, so the description must convey what comes back, and it does so by enumerating the snapshot sections. Combined with the margin_type interpretation rule, an agent has enough to call and read the result, though the relationship to the granular sibling tools remains unstated.

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 single parameter already documents 'Subaccount ID (defaults to configured)'. The description adds nothing about the parameter — no mention of the default-to-configured behavior or what happens with an invalid ID — so it sits at the baseline for a fully-documented single parameter.

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 opening clause names a specific verb and resource ('Full subaccount snapshot') and enumerates the included datasets (collaterals, open orders, positions, margin, portfolio value), which implicitly distinguishes it from the granular siblings get_collaterals / get_positions / get_open_orders / get_margin. It never explicitly says 'this aggregates what those tools return separately,' so the differentiation is inferred rather than stated.

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?

The bulk of the text is guidance on interpreting results (check margin_type before planning short-option strategies), which is real usage guidance for the returned data. However, there is no guidance on when to call this versus the single-purpose siblings, and no prerequisites or exclusions are stated.

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