diff --git a/apps/api/src/app/endpoints/mcp/mcp.controller.ts b/apps/api/src/app/endpoints/mcp/mcp.controller.ts index d3f34a09e5..3fe90c4dc3 100644 --- a/apps/api/src/app/endpoints/mcp/mcp.controller.ts +++ b/apps/api/src/app/endpoints/mcp/mcp.controller.ts @@ -118,7 +118,7 @@ export class GhostfolioMcpController { title: 'Search asset profiles' }, description: - 'Searches for asset profiles available to the user and gives import-ready candidates. Use this before importing an activity unless the exact symbol and data source are already known. Select the candidate that matches the intended asset and pass its symbol, dataSource and currency unchanged to import-activities.', + 'Searches for financial assets, such as stocks, ETFs, cryptocurrencies, mutual funds and commodities, which are available to the user. Each result is an asset profile that can be used to import an activity. Use this before importing an activity unless the exact symbol and data source are already known. Select the candidate that matches the intended asset and pass its symbol, dataSource and currency unchanged to import-activities.', name: 'search-asset-profiles', parameters: SEARCH_ASSET_PROFILES_PARAMETERS }) diff --git a/apps/api/src/app/endpoints/mcp/mcp.schemas.ts b/apps/api/src/app/endpoints/mcp/mcp.schemas.ts index 6a3779c203..2eb59264b3 100644 --- a/apps/api/src/app/endpoints/mcp/mcp.schemas.ts +++ b/apps/api/src/app/endpoints/mcp/mcp.schemas.ts @@ -78,15 +78,6 @@ export const GET_ACTIVITIES_PARAMETERS = z.object({ .describe(`The number of activities to get, at most ${MCP_MAX_ACTIVITIES}`) }); -export const SEARCH_ASSET_PROFILES_PARAMETERS = z.object({ - query: z - .string() - .trim() - .min(SEARCH_QUERY_MINIMUM_LENGTH) - .max(SEARCH_QUERY_MAXIMUM_LENGTH) - .describe('The name, symbol or ISIN of the asset profile to find') -}); - export const IMPORT_ACTIVITIES_PARAMETERS = z.object({ activities: z .array( @@ -124,3 +115,14 @@ export const IMPORT_ACTIVITIES_PARAMETERS = z.object({ .max(MCP_MAX_ACTIVITIES) .describe(`The activities to import, at most ${MCP_MAX_ACTIVITIES}`) }); + +export const SEARCH_ASSET_PROFILES_PARAMETERS = z.object({ + query: z + .string() + .trim() + .min(SEARCH_QUERY_MINIMUM_LENGTH) + .max(SEARCH_QUERY_MAXIMUM_LENGTH) + .describe( + 'The name, ticker symbol or ISIN of the financial asset, for example Apple, AAPL, Bitcoin or US0378331005' + ) +});