Path: blob/main/test/mcp/src/automationTools/localization.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* Localization Tools10*/11export function applyLocalizationTools(server: McpServer, appService: ApplicationService): RegisteredTool[] {12const tools: RegisteredTool[] = [];1314// Seems too niche15// server.tool(16// 'vscode_automation_localization_get_locale_info',17// 'Get current locale information',18// async () => {19// const localeInfo = await app.workbench.localization.getLocaleInfo();20// return {21// content: [{22// type: 'text' as const,23// text: `Locale info:\n${JSON.stringify(localeInfo, null, 2)}`24// }]25// };26// }27// );2829// Seems too niche30// server.tool(31// 'vscode_automation_localization_get_localized_strings',32// 'Get all localized strings',33// async () => {34// const localizedStrings = await app.workbench.localization.getLocalizedStrings();35// return {36// content: [{37// type: 'text' as const,38// text: `Localized strings:\n${JSON.stringify(localizedStrings, null, 2)}`39// }]40// };41// }42// );4344return tools;45}464748