Skip to main content
Glama
kite-connect-mcp

kite-connect-mcp

Margin required for a basket of orders

get_basket_margins
Read-onlyIdempotent

Calculate total and spread-benefit margin for a basket of 1–50 orders without placing them, with per-order margins, charges, and summary totals.

Instructions

Margin for 1 to 50 orders taken together as one basket, without placing anything (also in read-only mode).

initial is the total margin required to execute the orders, final the total margin with the spread (hedge) benefit, orders the per-order margins, and charges Kite's overall charges block, which can leave out the transaction tax when MCX and equity orders are mixed: use the per-order charges instead. All amounts are INR. mode=compact returns the totals only. summary gives the initial and final margin, the spread benefit (initial minus final) and the summed per-order charges.

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": {
      "orders": "<orders>"
    },
    "name": "get_basket_margins"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNocompact: only the totals; omit for the full breakdown
ordersYes1 to 50 orders
consider_positionsNotrue (default): net the basket against your open positions; false: price it alone

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive), and the description goes well beyond them by disclosing the meaning of each response block (initial, final, orders, charges, summary) and a real data caveat: the top-level `charges` block can omit transaction tax for mixed MCX/equity baskets, so per-order charges should be used instead. That kind of subtle output quirk is exactly the value a description should add.

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?

Purpose is front-loaded in the first clause, followed by a compact glossary of output fields; every sentence carries information. It is dense rather than bloated, though the run-on second sentence could be split for scannability.

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?

With no output schema, the description correctly spends its budget explaining return fields and the mode=compact variant, which is the right call for a calculation tool. The one gap is the unmentioned `consider_positions` netting behavior, which an agent would want to know before trusting the numbers.

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%, so the baseline is 3. The description restates mode=compact ('returns the totals only'), which the schema already says, and it never mentions the `consider_positions` parameter — a meaningful default-true behavior (netting against open positions) that materially changes the returned margin.

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 gives a specific verb and resource ('Margin for 1 to 50 orders taken together as one basket') plus an explicit non-effect ('without placing anything'). The 'basket' framing implicitly separates it from the sibling get_order_margins, but it never names that sibling, 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?

Usage is only implied: the 1-to-50-order basket scope suggests when this tool applies, and 'also in read-only mode' hints at safety, but there is no explicit 'use this instead of get_order_margins when...' routing. The agent must infer the boundary from the range limit.

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