dashboard_get_asset_chart
Retrieve historical chart data for a specific asset to analyze performance trends and track financial growth over time.
Instructions
Retrieves historical chart data for a specific asset.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| assetId | Yes | Asset ID |
Implementation Reference
- src/tools/handlers.ts:699-720 (handler)The main handler function that validates the input using DashboardGetAssetChartInputSchema, calls the Money Manager API endpoint '/getEachAssetChartData' with the assetId parameter, and returns an object containing the assetId and chartData array./** * Handler for dashboard_get_asset_chart tool * Retrieves historical chart data for a specific asset */ export async function handleDashboardGetAssetChart( httpClient: HttpClient, input: unknown, ): Promise<AssetChartResponse> { const validated = DashboardGetAssetChartInputSchema.parse(input); const rawResponse = await httpClient.post<RawAssetChartResponse>( "/getEachAssetChartData", { assetId: validated.assetId, }, ); return { assetId: validated.assetId, chartData: rawResponse.assetChartData || [], }; }
- src/schemas/index.ts:335-343 (schema)Zod schema defining the input for the tool: an object with a required 'assetId' string field (non-empty). Includes TypeScript type inference.* Input schema for dashboard_get_asset_chart tool */ export const DashboardGetAssetChartInputSchema = z.object({ assetId: AssetIdSchema, }); export type DashboardGetAssetChartInput = z.infer< typeof DashboardGetAssetChartInputSchema >;
- src/index.ts:422-431 (registration)MCP tool registration in the TOOL_DEFINITIONS array, including name, description, and JSON schema for input validation (requires assetId).name: "dashboard_get_asset_chart", description: "Retrieves historical chart data for a specific asset.", inputSchema: { type: "object" as const, properties: { assetId: { type: "string", description: "Asset ID" }, }, required: ["assetId"], }, },
- src/tools/handlers.ts:821-823 (registration)Maps the tool name 'dashboard_get_asset_chart' to its handler function 'handleDashboardGetAssetChart' in the toolHandlers registry used by executeToolHandler.// Dashboard dashboard_get_overview: handleDashboardGetOverview, dashboard_get_asset_chart: handleDashboardGetAssetChart,