Skip to main content
Glama

cex_unified_calculate_portfolio_margin

Read-onlyIdempotent

Calculate portfolio margin for hypothetical positions (read-only simulation).

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": {
      "body": "<body>"
    },
    "name": "cex_unified_calculate_portfolio_margin"
  }
}

Input Schema

NameRequiredDescriptionDefault
bodyYesJSON body: UnifiedPortfolioInput with spot_balances, spot_orders, futures_positions, etc.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. Added
  4. Removed
  5. Added
  6. Removed
  7. Added
  8. Removed
  9. Added

TDQS

A3.5/5.0
Behavior3/5

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

The annotations already declare readOnlyHint=true, idempotentHint=true, openWorldHint=true, and destructiveHint=false. The description reinforces the read-only simulation aspect and adds 'hypothetical positions', which is useful context, but it does not go beyond the annotations to explain calculation behavior, expected inputs, or result semantics.

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 a single, front-loaded sentence with no wasted wording. It immediately states the action, the scope, and the read-only simulation context.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a calculation tool with a single complex JSON body and no output schema, the description is adequate but not fully complete. It does not explain what the calculation returns, how inputs are interpreted, or any limitations of the simulation, leaving the agent to rely on the schema and annotations for those details.

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 description coverage is 100%, and the single 'body' parameter is documented as a JSON UnifiedPortfolioInput containing spot_balances, spot_orders, futures_positions, etc. The description adds no further parameter meaning beyond what the schema already provides, so the baseline of 3 applies.

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 description states a specific verb and resource: 'Calculate portfolio margin'. It also scopes the operation to hypothetical positions and calls it a read-only simulation, which helps an agent understand what the tool does. It does not explicitly differentiate itself from sibling tools, but no direct sibling performs the same calculation.

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 phrase 'for hypothetical positions (read-only simulation)' implies the tool should be used for margin simulation rather than real account queries or mutations. However, it gives no explicit when-to-use versus alternatives, no prerequisites, and no constraints on the hypothetical input scenarios.

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.