get_workspace
Retrieve the absolute path of the current VS Code workspace to identify the active project directory.
Instructions
Get current workspace path
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/services/WorkspaceService.ts:63-70 (handler)The actual handler function that executes the 'get_workspace' tool logic. It returns a ToolResult with the current workspace path.
async getWorkspace(): Promise<ToolResult> { return { content: [{ type: 'text', text: `Current workspace: ${this.workspacePath}`, }], }; } - src/toolDefinitions.ts:8-15 (schema)The tool definition/schema for 'get_workspace', including its name, description, and empty inputSchema (no parameters required).
{ name: 'get_workspace', description: 'Get current workspace path', inputSchema: { type: 'object', properties: {}, }, }, - src/index.ts:130-133 (registration)The registration point where the 'get_workspace' tool name is matched in the executeToolCommand switch statement and delegated to workspaceService.getWorkspace().
switch (name) { // Workspace Management case 'get_workspace': return await this.workspaceService.getWorkspace();