Skip to main content
Glama
Ritesh17rb

kite-mcp-server

by Ritesh17rb

calculate_basket_margins

Calculate combined margin for a basket of hypothetical orders, including hedge and offset benefits across positions such as spreads, to estimate required funds before placing trades.

Instructions

Calculate combined margin for a basket of hypothetical orders, accounting for hedges/offsets across them (e.g. a spread). Read-only — free on all tiers.

Input Schema

NameRequiredDescriptionDefault
ordersYes
compactNoIf true, only return total margins, not the breakdown
consider_positionsNoFactor in your existing positions when computing the basket margin

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations, the description carries the full burden; it does contribute that the call is read-only and free on all tiers, which is genuinely useful cost/safety context. However, it omits that orders are capped (maxItems 50), that nothing is actually placed, and how the result is shaped (breakdown vs compact total).

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?

Two tight sentences with the core purpose front-loaded and no filler; the free-tier note is short and attached to the safety claim rather than padding.

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 tool with a complex array-of-objects parameter, no annotations, and no output schema, the description explains the concept but leaves out the result shape (margin breakdown vs total-only under compact) and the 50-order ceiling. It is adequate to understand intent, not to call confidently.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 67%, but the description says nothing about any of the three parameters: the nested order object's required fields, the 'compact' toggle, or the default-true 'consider_positions' behavior. 'Accounting for hedges/offsets' hints at consider_positions at best, which is too indirect to compensate for the coverage gap.

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?

States a specific verb (calculate) and resource (combined margin for a basket of orders), with the distinguishing concept of hedges/offsets across legs (e.g. a spread). This implicitly separates it from the single-order sibling calculate_order_margins, but it never names that sibling or get_margins, so the routing signal 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 phrase 'hypothetical orders' and the spread example imply the pre-trade what-if scenario, but there is no explicit when-to-use, no when-not-to-use, and no named alternative (e.g. 'for a single order use calculate_order_margins'). An agent must infer its niche from context.

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