refresh_portfolio
Recalculate your portfolio P&L after recording transactions to get updated profit and loss numbers.
Instructions
Recalculate the user's portfolio P&L. Use after recording a batch of transactions if you want immediate fresh numbers. Requires IWMM_API_KEY.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/portfolio.ts:64-70 (handler)The handler function for the refresh_portfolio tool. It makes an authenticated POST request to /api/v1/portfolio/refresh.
export const refreshPortfolioTool = { name: "refresh_portfolio", description: "Recalculate the user's portfolio P&L. Use after recording a batch of transactions if you want immediate fresh numbers. Requires IWMM_API_KEY.", inputSchema: z.object({}), handler: () => apiFetch({ path: "/api/v1/portfolio/refresh", method: "POST", authenticated: true }), }; - src/tools/portfolio.ts:68-68 (schema)Input schema for refresh_portfolio - an empty object (no parameters required).
inputSchema: z.object({}), - src/tools/index.ts:77-77 (registration)Registration of refreshPortfolioTool in the tools array, which is later exported as toolsByName for the MCP server.
refreshPortfolioTool, - src/tools/index.ts:26-26 (registration)Import of refreshPortfolioTool from ./portfolio.ts into the central tools index.
refreshPortfolioTool,