Skip to main content
Glama
myfinancialria

MyFinancial Market Data MCP

Add Stocks to Portfolio

add_portfolio_stocks

Add stocks to a portfolio, merging duplicate holdings by weighted-average price. Accepts single, bulk, or pasted broker CSV holdings.

Instructions

Add one or more stocks to the user's portfolio, merging duplicates by weighted-average price. Accepts a single add, a bulk list, or holdings the user pasted from a broker CSV/table (parse it into the holdings array yourself). Example: "Add RELIANCE 10 shares at ₹1,350" → holdings:[{symbol:"RELIANCE",quantity:10,avg_price:1350}]. STRIP exchange suffixes before calling — -EQ, -BE, -SM, -ST, -BZ, -BL, -RE, -IV, -RR, .NS, .BO — and pass plain NSE symbols (APS-SM → APS; SME stocks are supported). When the user has stated symbol, quantity and price, add them directly. When you PARSED or inferred the holdings (broker CSV, a pasted table, a screenshot), show the parsed rows for confirmation first, and ask rather than guess a missing or ambiguous field. Use search_stocks if a symbol does not resolve. Call read_me for the full broker-CSV procedure.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
holdingsYesArray of stocks to add (1-100 items)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.5/5.0
Behavior5/5

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

Discloses several key behaviors beyond the annotations: duplicate stocks are merged by weighted-average price, exchange suffixes must be stripped before calling, and parsed/inferred holdings require confirmation. Since annotations are all false and provide no safety or side-effect hints, this description carries the transparency burden and does so well. No contradiction with annotations.

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 description is dense but front-loaded with the main action and merge behavior, followed by example, preprocessing rules, and confirmation workflow. Every section addresses a real edge case, though the long suffix list and ALL-CAPS 'STRIP' make it slightly less scannable than it could be; bullets would improve readability.

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?

For a mutation tool with one parameter, no output schema, and minimal annotations, the description covers the main scenarios: single add, bulk add, pasted broker data, symbol normalization, ambiguous-field handling, and fallback to search_stocks and read_me. Minor gaps remain around what the tool returns after success or failure and partial-failure behavior, but the operation is otherwise well specified.

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?

Although the schema already documents holdings, symbol, quantity, and avg_price at 100% coverage, the description adds meaning by mapping a natural-language example to the holdings array and instructing the agent to strip exchange suffixes and pass plain NSE symbols. This clarifies the expected values beyond the schema's generic examples.

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?

States the operation as 'Add one or more stocks to the user's portfolio', a specific verb and resource. It also clarifies scope by saying it accepts single, bulk, or pasted broker holdings and merges duplicates by weighted-average price, which distinguishes it from the watchlist and update/remove portfolio siblings.

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?

Provides explicit conditional guidance: add directly when the user has stated symbol, quantity, and price, but show parsed rows for confirmation when holdings were parsed or inferred. Names search_stocks as the fallback for unresolved symbols and read_me for the full broker-CSV procedure. It does not explicitly contrast with update_portfolio_stock or remove_portfolio_stocks, so it misses a full when-not-to-use statement.

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