get_card_performance
Retrieve best or worst performing Magic: The Gathering cards by profit and loss. Customize results with type and limit parameters.
Instructions
Get the user's best- or worst-performing cards by P&L. Default: best, top 10. Premium-gated. Requires IWMM_API_KEY.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | No | ||
| limit | No |
Implementation Reference
- src/tools/portfolio.ts:31-33 (handler)The handler function for get_card_performance that calls apiFetch to GET /api/v1/portfolio/performance with optional 'type' and 'limit' query params, authenticated.
handler: (input: { type?: "best" | "worst"; limit?: number }) => apiFetch({ path: "/api/v1/portfolio/performance", query: input, authenticated: true }), }; - src/tools/portfolio.ts:27-30 (schema)Input schema defining optional 'type' (best/worst) and 'limit' (1-100) parameters.
inputSchema: z.object({ type: z.enum(["best", "worst"]).optional(), limit: z.number().int().min(1).max(100).optional(), }), - src/tools/portfolio.ts:23-24 (registration)Definition and export of the get_card_performance tool object (name, description, inputSchema, handler).
export const getCardPerformanceTool = { name: "get_card_performance", - src/tools/index.ts:19-27 (registration)Import of getCardPerformanceTool from portfolio.ts into the central tools registry.
import { getPortfolioSummaryTool, getPortfolioHistoryTool, getCardPerformanceTool, getCashFlowTool, getRealizedGainsTool, getPortfolioBreakdownTool, refreshPortfolioTool, } from "./portfolio.js"; - src/tools/index.ts:73-73 (registration)Registration of getCardPerformanceTool in the tools array, making it available for listing and invocation via the MCP server.
getCardPerformanceTool,