Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/test/mcp/src/automationTools/localization.ts
3520 views
1
/*---------------------------------------------------------------------------------------------
2
* Copyright (c) Microsoft Corporation. All rights reserved.
3
* Licensed under the MIT License. See License.txt in the project root for license information.
4
*--------------------------------------------------------------------------------------------*/
5
6
import { McpServer, RegisteredTool } from '@modelcontextprotocol/sdk/server/mcp.js';
7
import { ApplicationService } from '../application';
8
9
/**
10
* Localization Tools
11
*/
12
export function applyLocalizationTools(server: McpServer, appService: ApplicationService): RegisteredTool[] {
13
const tools: RegisteredTool[] = [];
14
15
// Seems too niche
16
// server.tool(
17
// 'vscode_automation_localization_get_locale_info',
18
// 'Get current locale information',
19
// async () => {
20
// const localeInfo = await app.workbench.localization.getLocaleInfo();
21
// return {
22
// content: [{
23
// type: 'text' as const,
24
// text: `Locale info:\n${JSON.stringify(localeInfo, null, 2)}`
25
// }]
26
// };
27
// }
28
// );
29
30
// Seems too niche
31
// server.tool(
32
// 'vscode_automation_localization_get_localized_strings',
33
// 'Get all localized strings',
34
// async () => {
35
// const localizedStrings = await app.workbench.localization.getLocalizedStrings();
36
// return {
37
// content: [{
38
// type: 'text' as const,
39
// text: `Localized strings:\n${JSON.stringify(localizedStrings, null, 2)}`
40
// }]
41
// };
42
// }
43
// );
44
45
return tools;
46
}
47
48