Path: blob/main/test/mcp/src/automationTools/profiler.ts
3520 views
/*---------------------------------------------------------------------------------------------1* Copyright (c) Microsoft Corporation. All rights reserved.2* Licensed under the MIT License. See License.txt in the project root for license information.3*--------------------------------------------------------------------------------------------*/45import { McpServer, RegisteredTool } from '@modelcontextprotocol/sdk/server/mcp.js';6import { ApplicationService } from '../application';78/**9* Profiler Tools10* Note: Due to MCP limitations, these tools provide information about profiler methods11* but cannot execute them directly as they require function parameters12*/13export function applyProfilerTools(server: McpServer, appService: ApplicationService): RegisteredTool[] {14const tools: RegisteredTool[] = [];1516// Seems too niche17// server.tool(18// 'vscode_automation_profiler_info',19// 'Get information about available profiler methods',20// {},21// async () => {22// return {23// content: [{24// type: 'text' as const,25// text: `Profiler methods available:26// - checkObjectLeaks(classNames, fn): Check for object leaks during function execution27// - checkHeapLeaks(classNames, fn): Check for heap leaks during function execution2829// Note: These methods require function parameters and cannot be executed directly via MCP.30// They are primarily used within VS Code's automation test framework.`31// }]32// };33// }34// );3536return tools;37}383940