{"at":"2026-11-23T01:33:37.761Z","dir":"sent","era":"server_discover","message":{"id":1,"jsonrpc":"2.0","method":"server/discover","params":{"_meta":{"io.modelcontextprotocol/clientCapabilities":{},"io.modelcontextprotocol/clientInfo":{"name":"didrun-lab","version":"0.1.0"},"io.modelcontextprotocol/protocolVersion":"2026-07-28"}}}}
{"at":"2026-11-23T01:33:38.648Z","dir":"received","era":"server_discover","message":{"error":{"code":-32602,"data":"","message":"Invalid request parameters"},"id":1,"jsonrpc":"2.0"}}
{"at":"2026-11-23T01:33:38.799Z","dir":"sent","era":"initialize","message":{"id":1,"jsonrpc":"2.0","method":"initialize","params":{"capabilities":{},"clientInfo":{"name":"didrun-lab","version":"0.1.0"},"protocolVersion":"2025-11-25"}}}
{"at":"2026-11-23T01:33:39.653Z","dir":"received","era":"initialize","message":{"id":1,"jsonrpc":"2.0","result":{"capabilities":{"experimental":{},"prompts":{"listChanged":false},"resources":{"listChanged":false,"subscribe":false},"tools":{"listChanged":false}},"protocolVersion":"2025-11-25","serverInfo":{"name":"bahi-mcp","version":"1.30.0"}}}}
{"at":"2026-11-23T01:33:39.653Z","dir":"sent","era":"initialize","message":{"jsonrpc":"2.0","method":"notifications/initialized"}}
{"at":"2026-11-23T01:33:39.653Z","dir":"sent","era":"initialize","message":{"id":2,"jsonrpc":"2.0","method":"tools/list","params":{}}}
{"at":"2026-11-23T01:33:39.655Z","dir":"received","era":"initialize","message":{"id":2,"jsonrpc":"2.0","result":{"tools":[{"description":"Search Indian mutual fund schemes by name (e.g. 'sbi midcap direct growth').\n\nReturns scheme codes (AMFI) and names. Use a code with the other tools.\n","inputSchema":{"properties":{"limit":{"default":20,"title":"Limit","type":"integer"},"query":{"title":"Query","type":"string"}},"required":["query"],"title":"search_schemesArguments","type":"object"},"name":"search_schemes","outputSchema":{"properties":{"result":{"items":{"additionalProperties":{"type":"string"},"type":"object"},"title":"Result","type":"array"}},"required":["result"],"title":"search_schemesOutput","type":"object"}},{"description":"Latest NAV and basic quote for a scheme, by AMFI scheme code.","inputSchema":{"properties":{"scheme_code":{"title":"Scheme Code","type":"string"}},"required":["scheme_code"],"title":"get_scheme_quoteArguments","type":"object"},"name":"get_scheme_quote","outputSchema":{"additionalProperties":true,"title":"get_scheme_quoteDictOutput","type":"object"}},{"description":"Fund house, scheme type, category and start date for a scheme code.","inputSchema":{"properties":{"scheme_code":{"title":"Scheme Code","type":"string"}},"required":["scheme_code"],"title":"get_scheme_detailsArguments","type":"object"},"name":"get_scheme_details","outputSchema":{"additionalProperties":true,"title":"get_scheme_detailsDictOutput","type":"object"}},{"description":"NAV history for a scheme. Dates as DD-MM-YYYY or YYYY-MM-DD.\n\nReturns at most `max_points` of the most recent points in the range, to keep\nresponses small.\n","inputSchema":{"properties":{"end_date":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"End Date"},"max_points":{"default":100,"title":"Max Points","type":"integer"},"scheme_code":{"title":"Scheme Code","type":"string"},"start_date":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Start Date"}},"required":["scheme_code"],"title":"get_nav_historyArguments","type":"object"},"name":"get_nav_history","outputSchema":{"additionalProperties":true,"title":"get_nav_historyDictOutput","type":"object"}},{"description":"Current value of a mutual fund portfolio at latest NAVs.\n\nEach holding: {\"scheme_code\": \"119551\", \"units\": 125.5}.\n","inputSchema":{"properties":{"holdings":{"items":{"additionalProperties":true,"type":"object"},"title":"Holdings","type":"array"}},"required":["holdings"],"title":"get_portfolio_valueArguments","type":"object"},"name":"get_portfolio_value","outputSchema":{"additionalProperties":true,"title":"get_portfolio_valueDictOutput","type":"object"}},{"description":"Clear cached AMFI data so the next call fetches fresh NAVs.\n\nNAVs are cached for 24 hours. AMFI usually publishes the day's NAVs after\nabout 9 PM IST, so clear the cache after that to see them.\n","inputSchema":{"properties":{},"title":"clear_cacheArguments","type":"object"},"name":"clear_cache","outputSchema":{"additionalProperties":true,"title":"clear_cacheDictOutput","type":"object"}},{"description":"Simulate a monthly SIP in a scheme using its real NAV history.\n\nReturns total invested, units, current value, absolute return and XIRR.\n`end_date` defaults to today. Dates as DD-MM-YYYY or YYYY-MM-DD.\n","inputSchema":{"properties":{"end_date":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"End Date"},"monthly_amount":{"title":"Monthly Amount","type":"number"},"scheme_code":{"title":"Scheme Code","type":"string"},"start_date":{"title":"Start Date","type":"string"}},"required":["scheme_code","monthly_amount","start_date"],"title":"calculate_sip_returnsArguments","type":"object"},"name":"calculate_sip_returns","outputSchema":{"additionalProperties":true,"title":"calculate_sip_returnsDictOutput","type":"object"}},{"description":"Compare 1 to 5 mutual funds side by side.\n\nFor each fund: latest NAV, 1/3/5-year annualised returns (null if the fund is\ntoo new), and risk over `risk_years`: volatility, max drawdown and Sharpe ratio.\n","inputSchema":{"properties":{"risk_free_rate_pct":{"default":6.5,"title":"Risk Free Rate Pct","type":"number"},"risk_years":{"default":3.0,"title":"Risk Years","type":"number"},"scheme_codes":{"items":{"type":"string"},"title":"Scheme Codes","type":"array"}},"required":["scheme_codes"],"title":"compare_fundsArguments","type":"object"},"name":"compare_funds","outputSchema":{"additionalProperties":true,"title":"compare_fundsDictOutput","type":"object"}},{"description":"Rolling-return distribution for a fund.\n\nShows min, max, mean and median annualised return across all `window_years`\nwindows in its history, plus how often it was positive and above\n`threshold_pct`. Better than a single start-to-end return.\n","inputSchema":{"properties":{"scheme_code":{"title":"Scheme Code","type":"string"},"step_days":{"default":30,"title":"Step Days","type":"integer"},"threshold_pct":{"default":12.0,"title":"Threshold Pct","type":"number"},"window_years":{"default":3.0,"title":"Window Years","type":"number"}},"required":["scheme_code"],"title":"get_rolling_returnsArguments","type":"object"},"name":"get_rolling_returns","outputSchema":{"additionalProperties":true,"title":"get_rolling_returnsDictOutput","type":"object"}},{"description":"Latest price for an NSE/BSE stock, e.g. symbol 'RELIANCE' on exchange 'NSE'.\n\nSource is Yahoo Finance (unofficial, may be delayed).\n","inputSchema":{"properties":{"exchange":{"default":"NSE","title":"Exchange","type":"string"},"symbol":{"title":"Symbol","type":"string"}},"required":["symbol"],"title":"get_stock_quoteArguments","type":"object"},"name":"get_stock_quote","outputSchema":{"additionalProperties":true,"title":"get_stock_quoteDictOutput","type":"object"}},{"description":"Latest level of an Indian index: nifty50, sensex, banknifty, niftyit or indiavix.","inputSchema":{"properties":{"index":{"default":"nifty50","title":"Index","type":"string"}},"title":"get_index_quoteArguments","type":"object"},"name":"get_index_quote","outputSchema":{"additionalProperties":true,"title":"get_index_quoteDictOutput","type":"object"}},{"description":"Price history (OHLCV) for an NSE/BSE stock or index ticker like '^NSEI'.\n\nperiod: 1d, 5d, 1mo, 3mo, 6mo, 1y, 2y, 5y, 10y, ytd, max.\ninterval: 1d, 5d, 1wk, 1mo. Returns at most `max_points` recent rows.\n","inputSchema":{"properties":{"exchange":{"default":"NSE","title":"Exchange","type":"string"},"interval":{"default":"1d","title":"Interval","type":"string"},"max_points":{"default":120,"title":"Max Points","type":"integer"},"period":{"default":"1y","title":"Period","type":"string"},"symbol":{"title":"Symbol","type":"string"}},"required":["symbol"],"title":"get_stock_historyArguments","type":"object"},"name":"get_stock_history","outputSchema":{"additionalProperties":true,"title":"get_stock_historyDictOutput","type":"object"}},{"description":"XIRR for dated cash flows.\n\nEach item: {\"date\": \"YYYY-MM-DD\", \"amount\": -10000}. Investments are\nnegative, redemptions / current value positive.\n","inputSchema":{"properties":{"cashflows":{"items":{"additionalProperties":true,"type":"object"},"title":"Cashflows","type":"array"}},"required":["cashflows"],"title":"calculate_xirrArguments","type":"object"},"name":"calculate_xirr","outputSchema":{"additionalProperties":true,"title":"calculate_xirrDictOutput","type":"object"}},{"description":"CAGR between two values over a date range.","inputSchema":{"properties":{"end_date":{"title":"End Date","type":"string"},"final_value":{"title":"Final Value","type":"number"},"initial_value":{"title":"Initial Value","type":"number"},"start_date":{"title":"Start Date","type":"string"}},"required":["initial_value","final_value","start_date","end_date"],"title":"calculate_cagrArguments","type":"object"},"name":"calculate_cagr","outputSchema":{"additionalProperties":true,"title":"calculate_cagrDictOutput","type":"object"}},{"description":"Loan EMI, total payment and total interest (reducing balance).","inputSchema":{"properties":{"annual_rate_pct":{"title":"Annual Rate Pct","type":"number"},"principal":{"title":"Principal","type":"number"},"years":{"title":"Years","type":"number"}},"required":["principal","annual_rate_pct","years"],"title":"calculate_emiArguments","type":"object"},"name":"calculate_emi","outputSchema":{"additionalProperties":true,"title":"calculate_emiDictOutput","type":"object"}},{"description":"Fixed deposit maturity amount and effective yield (quarterly compounding by default).","inputSchema":{"properties":{"annual_rate_pct":{"title":"Annual Rate Pct","type":"number"},"compounding_per_year":{"default":4,"title":"Compounding Per Year","type":"integer"},"principal":{"title":"Principal","type":"number"},"years":{"title":"Years","type":"number"}},"required":["principal","annual_rate_pct","years"],"title":"calculate_fdArguments","type":"object"},"name":"calculate_fd","outputSchema":{"additionalProperties":true,"title":"calculate_fdDictOutput","type":"object"}},{"description":"Recurring deposit maturity amount (quarterly compounding).","inputSchema":{"properties":{"annual_rate_pct":{"title":"Annual Rate Pct","type":"number"},"monthly_deposit":{"title":"Monthly Deposit","type":"number"},"months":{"title":"Months","type":"integer"}},"required":["monthly_deposit","annual_rate_pct","months"],"title":"calculate_rdArguments","type":"object"},"name":"calculate_rd","outputSchema":{"additionalProperties":true,"title":"calculate_rdDictOutput","type":"object"}},{"description":"Future value of a one-time investment at a constant assumed annual return.","inputSchema":{"properties":{"expected_return_pct":{"title":"Expected Return Pct","type":"number"},"principal":{"title":"Principal","type":"number"},"years":{"title":"Years","type":"number"}},"required":["principal","expected_return_pct","years"],"title":"calculate_lumpsum_valueArguments","type":"object"},"name":"calculate_lumpsum_value","outputSchema":{"additionalProperties":true,"title":"calculate_lumpsum_valueDictOutput","type":"object"}},{"description":"Project a SIP at an assumed constant return, with an optional yearly step-up.\n\nThis is a what-if projection. For a SIP on a real fund's history, use\ncalculate_sip_returns.\n","inputSchema":{"properties":{"annual_step_up_pct":{"default":0.0,"title":"Annual Step Up Pct","type":"number"},"expected_return_pct":{"title":"Expected Return Pct","type":"number"},"monthly_amount":{"title":"Monthly Amount","type":"number"},"years":{"title":"Years","type":"number"}},"required":["monthly_amount","expected_return_pct","years"],"title":"project_sipArguments","type":"object"},"name":"project_sip","outputSchema":{"additionalProperties":true,"title":"project_sipDictOutput","type":"object"}},{"description":"Systematic withdrawal plan: does the corpus last, and how much remains?","inputSchema":{"properties":{"corpus":{"title":"Corpus","type":"number"},"expected_return_pct":{"title":"Expected Return Pct","type":"number"},"monthly_withdrawal":{"title":"Monthly Withdrawal","type":"number"},"years":{"title":"Years","type":"number"}},"required":["corpus","monthly_withdrawal","expected_return_pct","years"],"title":"calculate_swpArguments","type":"object"},"name":"calculate_swp","outputSchema":{"additionalProperties":true,"title":"calculate_swpDictOutput","type":"object"}},{"description":"Corpus needed at retirement and the monthly SIP required to build it.","inputSchema":{"properties":{"current_age":{"title":"Current Age","type":"integer"},"current_monthly_expense":{"title":"Current Monthly Expense","type":"number"},"existing_savings":{"default":0.0,"title":"Existing Savings","type":"number"},"inflation_pct":{"default":6.0,"title":"Inflation Pct","type":"number"},"life_expectancy":{"title":"Life Expectancy","type":"integer"},"post_retirement_return_pct":{"default":8.0,"title":"Post Retirement Return Pct","type":"number"},"pre_retirement_return_pct":{"default":12.0,"title":"Pre Retirement Return Pct","type":"number"},"retirement_age":{"title":"Retirement Age","type":"integer"}},"required":["current_monthly_expense","current_age","retirement_age","life_expectancy"],"title":"plan_retirementArguments","type":"object"},"name":"plan_retirement","outputSchema":{"additionalProperties":true,"title":"plan_retirementDictOutput","type":"object"}},{"description":"Estimate capital gains tax on a mutual fund redemption (FY 2026-27 rules).\n\nSupply holding_days, or both purchase_date and sale_date for exact calendar\nholding-period classification. Equity STCG is 20%; LTCG is 12.5% above the\nremaining annual exemption. 'debt'/'other': taxed at `slab_rate_pct`.\nExcludes surcharge and loss set-off. Confirm with a tax professional.\n","inputSchema":{"properties":{"fund_type":{"default":"equity","title":"Fund Type","type":"string"},"holding_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Holding Days"},"ltcg_exemption_available":{"default":125000.0,"title":"Ltcg Exemption Available","type":"number"},"purchase_amount":{"title":"Purchase Amount","type":"number"},"purchase_date":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Purchase Date"},"sale_amount":{"title":"Sale Amount","type":"number"},"sale_date":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Sale Date"},"slab_rate_pct":{"default":30.0,"title":"Slab Rate Pct","type":"number"}},"required":["purchase_amount","sale_amount"],"title":"estimate_mf_taxArguments","type":"object"},"name":"estimate_mf_tax","outputSchema":{"additionalProperties":true,"title":"estimate_mf_taxDictOutput","type":"object"}}]}}}
