@vscode-mcp/vscode-mcp-ipc
Version:
IPC communication layer between MCP Server and VSCode extension
21 lines • 967 B
JavaScript
/**
* Execute command event types and schemas
*/
import { z } from 'zod';
/**
* Execute command input schema
*/
export const ExecuteCommandInputSchema = z.object({
command: z.string().describe('VSCode command to execute (e.g., \'vscode.open\', \'editor.action.formatDocument\')'),
args: z.string().optional().describe(`Optional JSON string of arguments array to pass to the command
- args parameter must be a JSON string representing an array of arguments
- For file paths: Use absolute paths like '["file:///absolute/path/to/file.ts"]' (VSCode commands still expect file:// URIs)`),
saveAllEditors: z.boolean().optional().default(true).describe('Save all dirty editors after executing the command (default: true)'),
}).strict();
/**
* Execute command output schema
*/
export const ExecuteCommandOutputSchema = z.object({
result: z.unknown().describe('Result from the command execution'),
}).strict();
//# sourceMappingURL=execute-command.js.map