(server: McpServer, appService: ApplicationService)
| 11 | * Task Tools |
| 12 | */ |
| 13 | export function applyTaskTools(server: McpServer, appService: ApplicationService): RegisteredTool[] { |
| 14 | const tools: RegisteredTool[] = []; |
| 15 | |
| 16 | // Seems too niche |
| 17 | // server.tool( |
| 18 | // 'vscode_automation_task_assert_tasks', |
| 19 | // 'Assert that specific tasks exist with given properties', |
| 20 | // { |
| 21 | // filter: z.string().describe('Filter string for tasks'), |
| 22 | // expected: z.array(z.object({ |
| 23 | // label: z.string().optional(), |
| 24 | // type: z.string().optional(), |
| 25 | // command: z.string().optional(), |
| 26 | // identifier: z.string().optional(), |
| 27 | // group: z.string().optional(), |
| 28 | // isBackground: z.boolean().optional(), |
| 29 | // promptOnClose: z.boolean().optional(), |
| 30 | // icon: z.object({ |
| 31 | // id: z.string().optional(), |
| 32 | // color: z.string().optional() |
| 33 | // }).optional(), |
| 34 | // hide: z.boolean().optional() |
| 35 | // })).describe('Array of expected task properties'), |
| 36 | // type: z.enum(['run', 'configure']).describe('Type of task operation') |
| 37 | // }, |
| 38 | // async (args) => { |
| 39 | // const { filter, expected, type } = args; |
| 40 | // await app.workbench.task.assertTasks(filter, expected, type); |
| 41 | // return { |
| 42 | // content: [{ |
| 43 | // type: 'text' as const, |
| 44 | // text: `Asserted ${expected.length} tasks for ${type} with filter: "${filter}"` |
| 45 | // }] |
| 46 | // }; |
| 47 | // } |
| 48 | // ); |
| 49 | |
| 50 | tools.push(server.tool( |
| 51 | 'vscode_automation_task_configure', |
| 52 | 'Configure a task with specific properties', |
| 53 | { |
| 54 | properties: z.object({ |
| 55 | label: z.string().optional(), |
| 56 | type: z.string().optional(), |
| 57 | command: z.string().optional(), |
| 58 | identifier: z.string().optional(), |
| 59 | group: z.string().optional(), |
| 60 | isBackground: z.boolean().optional(), |
| 61 | promptOnClose: z.boolean().optional(), |
| 62 | icon: z.object({ |
| 63 | id: z.string().optional(), |
| 64 | color: z.string().optional() |
| 65 | }).optional(), |
| 66 | hide: z.boolean().optional() |
| 67 | }).describe('Task configuration properties') |
| 68 | }, |
| 69 | async (args) => { |
| 70 | const { properties } = args; |
no test coverage detected
searching dependent graphs…