MCPcopy
hub / github.com/microsoft/vscode / applyProblemsTools

Function applyProblemsTools

test/mcp/src/automationTools/problems.ts:13–113  ·  view source on GitHub ↗
(server: McpServer, appService: ApplicationService)

Source from the content-addressed store, hash-verified

11 * Problems Panel Tools
12 */
13export function applyProblemsTools(server: McpServer, appService: ApplicationService): RegisteredTool[] {
14 const tools: RegisteredTool[] = [];
15
16 tools.push(server.tool(
17 'vscode_automation_problems_show',
18 'Show the problems view',
19 async () => {
20 const app = await appService.getOrCreateApplication();
21 await app.workbench.problems.showProblemsView();
22 return {
23 content: [{
24 type: 'text' as const,
25 text: 'Showed problems view'
26 }]
27 };
28 }
29 ));
30
31 tools.push(server.tool(
32 'vscode_automation_problems_hide',
33 'Hide the problems view',
34 async () => {
35 const app = await appService.getOrCreateApplication();
36 await app.workbench.problems.hideProblemsView();
37 return {
38 content: [{
39 type: 'text' as const,
40 text: 'Hid problems view'
41 }]
42 };
43 }
44 ));
45
46 // Playwright can probably figure this one out
47 // server.tool(
48 // 'vscode_automation_problems_wait_for_view',
49 // 'Wait for the problems view to appear',
50 // async () => {
51 // await app.workbench.problems.waitForProblemsView();
52 // return {
53 // content: [{
54 // type: 'text' as const,
55 // text: 'Problems view is now visible'
56 // }]
57 // };
58 // }
59 // );
60
61 tools.push(server.tool(
62 'vscode_automation_problems_get_selector_in_view',
63 'Get CSS selector for problems of a specific severity in the problems view',
64 {
65 severity: z.enum(['WARNING', 'ERROR']).describe('Problem severity (WARNING or ERROR)')
66 },
67 async (args) => {
68 const { severity } = args;
69 const severityMap: Record<string, number> = {
70 'WARNING': 0,

Callers 1

applyAllToolsFunction · 0.85

Calls 7

showProblemsViewMethod · 0.80
hideProblemsViewMethod · 0.80
pushMethod · 0.65
toolMethod · 0.65
describeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…