From a467b291f1d6b6d5b3ba0710228ab1ec1c9c5757 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Sun, 20 Sep 2026 09:44:02 +0200 Subject: [PATCH] Add MCP tool to get watchlist --- apps/api/src/app/endpoints/mcp/mcp.controller.ts | 2 +- .../services/portfolio-table/portfolio-table.service.spec.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/api/src/app/endpoints/mcp/mcp.controller.ts b/apps/api/src/app/endpoints/mcp/mcp.controller.ts index 7feae166b3..dee145015f 100644 --- a/apps/api/src/app/endpoints/mcp/mcp.controller.ts +++ b/apps/api/src/app/endpoints/mcp/mcp.controller.ts @@ -94,7 +94,7 @@ export class GhostfolioMcpController { }, description: `Gives the watchlist of the user, sorted by name, with these columns: ${PortfolioTableService.getWatchlistTableColumnNames().join( ', ' - )}. A trend compares the average market price of the last 50 or 200 days with the average of the 50 or 200 days before. The change from the all time high is the difference between the current market price and the all time high in percentage.`, + )}. A trend compares the average market price of the last 50 or 200 days with the average of the 50 or 200 days before. A trend is UNKNOWN if there is not sufficient market data. The change from the all time high is the difference between the current market price and the all time high in percentage.`, name: 'get-watchlist' }) public async getWatchlist(@Impersonation() { userId }: ImpersonationContext) { diff --git a/apps/api/src/services/portfolio-table/portfolio-table.service.spec.ts b/apps/api/src/services/portfolio-table/portfolio-table.service.spec.ts index c0fabe6de5..ba2be47cf6 100644 --- a/apps/api/src/services/portfolio-table/portfolio-table.service.spec.ts +++ b/apps/api/src/services/portfolio-table/portfolio-table.service.spec.ts @@ -126,7 +126,7 @@ function createWatchlistItem({ performances: { allTimeHigh: { performancePercent, - date: new Date('2024-01-01') + date: new Date('2024-01-01T00:00:00') } }, trend50d: 'UP',