Skip to main content
Glama

Import holdings

import_holdings

Import a broker's holdings export (Zerodha/Groww/Kite style CSV: instrument, quantity, average cost, optionally LTP) into an investment account. Each row becomes a holding plus one 'buy' lot at the average cost dated as_of, so cost basis and P/L work from day one. Existing holdings (same symbol) are skipped unless replace=true. Dry-run unless commit=true.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
csvYesThe export, header included
kindNoDefault stock; use mutualFund for a fund export
as_ofNoDate to give the opening lots; default today
commitNo
replaceNoRe-import holdings that already exist (their lots are replaced by the new opening lot)
currencyNoDefault: the account's currency
account_idYesThe investment account (type investment)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

The description goes well beyond the annotations by disclosing the full effect on holdings and lots, duplicate handling, the dry-run default, and the commit requirement. It also explains why the behavior matters ('so cost basis and P/L work from day one'), which helps the agent anticipate downstream consequences.

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?

Three dense sentences deliver the core purpose, default behavior, and side-effect semantics without filler. The most decision-relevant facts (duplicates skipped, dry-run unless commit) are front-loaded and each sentence earns its place.

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?

For a 7-parameter mutation tool with 86% schema coverage and an output schema, the description covers the non-obvious behaviors: CSV format, lot creation, duplicate handling, replace semantics, and commit gating. An agent has what it needs to call the tool correctly.

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?

The schema already documents most parameters with 86% coverage, so the baseline is high. The description adds real value beyond the schema by defining the expected CSV columns (instrument, quantity, average cost, optionally LTP), how as_of becomes the lot date, and how replace affects existing holdings.

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 names a specific action ('import a broker's holdings export') and a specific destination ('into an investment account'), with enough CSV detail to distinguish it from one-off tools like add_holding or import_statement. The row-to-holding-and-buy-lot behavior makes the purpose concrete and unambiguous.

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 clearly states what this tool is for and gives important invocation context: it handles broker exports, creates opening lots, skips existing holdings unless replace=true, and dry-runs unless commit=true. It does not explicitly say when to use a sibling tool instead, but the context is clear enough for an agent to select it among the many sibling tools.

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.