Skip to main content
Glama

get_workspace_info

Retrieve workspace details including root path, operating system, Node.js version, and git status summary.

Instructions

Get information about the current workspace: root directory, platform, Node version, git status summary.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workspace_rootNoWorkspace root directory (optional)

Implementation Reference

  • src/index.ts:302-311 (registration)
    Registration of the 'get_workspace_info' tool in the tools list, including its description and inputSchema (with optional workspace_root property).
    {
      name: "get_workspace_info",
      description: "Get information about the current workspace: root directory, platform, Node version, git status summary.",
      inputSchema: {
        type: "object",
        properties: {
          workspace_root: { type: "string", description: "Workspace root directory (optional)" },
        },
      },
    },
  • Handler for 'get_workspace_info' tool. Extracts workspace root (or uses cwd), retrieves git branch and status via shell commands, then returns workspace info including root, platform, node_version, git_branch, and git_status as JSON.
    case "get_workspace_info": {
      const root = (a.workspace_root as string | undefined) ?? process.cwd();
      let gitBranch = "N/A";
      let gitStatus = "N/A";
      try {
        const { stdout: branch } = await execAsync("git rev-parse --abbrev-ref HEAD", { cwd: root });
        gitBranch = branch.trim();
        const { stdout: status } = await execAsync("git status --short", { cwd: root });
        gitStatus = status.trim() || "clean";
      } catch {
        // not a git repo
      }
      const info = {
        workspace_root: root,
        platform: process.platform,
        node_version: process.version,
        git_branch: gitBranch,
        git_status: gitStatus,
      };
      return { content: [{ type: "text", text: JSON.stringify(info, null, 2) }] };
    }
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided. The description lists what information is returned but does not disclose any behavioral traits like read-only nature, side effects, or prerequisites. It provides some transparency via the listed fields.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single sentence of 12 words, no fluff, efficiently conveys the tool's purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the low complexity (one optional parameter, no output schema), the description adequately lists the return items. It is complete enough for an agent to understand what the tool provides.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, and the description adds no extra meaning beyond the schema's parameter description. It mentions the parameter is optional, but that is already clear from zero required params.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb 'Get' and resource 'information about the current workspace', listing exact items (root directory, platform, Node version, git status summary). It clearly distinguishes from sibling tools which are file and command operations.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit when-to-use or when-not-to-use guidance. Usage is implied for retrieving workspace info, but no alternatives or exclusions are mentioned, even though siblings exist.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/KloutDevs/vscode-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server