get_realized_gains
Get realized gains from Magic: The Gathering sell transactions using FIFO cost basis. Requires API key.
Instructions
Get the user's realized gains from SELL transactions using FIFO cost basis. Premium-gated. Requires IWMM_API_KEY.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/portfolio.ts:43-49 (handler)The getRealizedGainsTool object defines the 'get_realized_gains' tool. Its handler calls apiFetch to GET /api/v1/portfolio/realized-gains (authenticated). No input parameters required.
export const getRealizedGainsTool = { name: "get_realized_gains", description: "Get the user's realized gains from SELL transactions using FIFO cost basis. Premium-gated. Requires IWMM_API_KEY.", inputSchema: z.object({}), handler: () => apiFetch({ path: "/api/v1/portfolio/realized-gains", authenticated: true }), }; - src/tools/portfolio.ts:46-47 (schema)Input schema is an empty object (z.object({})), meaning no inputs are accepted.
"Get the user's realized gains from SELL transactions using FIFO cost basis. Premium-gated. Requires IWMM_API_KEY.", inputSchema: z.object({}), - src/tools/index.ts:75-75 (registration)The tool is registered in the tools array and is also accessible via the toolsByName lookup map.
getRealizedGainsTool,