update_portfolio_stock
Overwrite quantity or average price for an existing holding to reflect a partial sell or correct a recorded cost basis. Use for updates, not new buy lots.
Instructions
Overwrite quantity and/or average price for an existing holding — e.g. after a partial sell (set the new remaining quantity) or to correct your recorded cost basis.
Use add_portfolio_stock instead for a new buy lot — it recalculates
the average price for you rather than replacing it.
symbol: NSE/BSE symbol already in your portfolio quantity: new total share count (0 = leave unchanged) avg_price: new average price (0 = leave unchanged)
Examples: update_portfolio_stock("RELIANCE", quantity=5) # sold half update_portfolio_stock("TCS", avg_price=3750) # correct cost basis
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": {
"symbol": "<symbol>"
},
"name": "update_portfolio_stock"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | Yes | ||
| quantity | No | ||
| avg_price | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||