Skip to main content
Glama

pwd

Displays the current working directory path to help users navigate and understand their location within the virtual filesystem workspace.

Instructions

Get current working directory.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Core handler implementing the pwd tool logic: retrieves current path from workspace manager and returns PrintWorkingDirectoryResponse.
    async def pwd(self) -> PrintWorkingDirectoryResponse:
        """
        Get current working directory.
    
        Returns:
            PrintWorkingDirectoryResponse with cwd
        """
        cwd = self.workspace_manager.get_current_path()
        return PrintWorkingDirectoryResponse(cwd=cwd)
  • Registers the 'pwd' tool on the MCP server, delegating execution to VFSTools.pwd().
    @server.tool
    async def pwd():
        """Get current working directory."""
        return await vfs_tools.pwd()
  • Pydantic model defining the response schema for the pwd tool (current working directory path).
    class PrintWorkingDirectoryResponse(BaseModel):
        """Response from pwd operation"""
    
        cwd: str
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool 'Get[s] current working directory,' which implies a read-only operation, but it does not disclose any behavioral traits such as error conditions, output format, or performance characteristics. This leaves gaps in understanding how the tool behaves in practice.

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?

The description is a single, efficient sentence that directly states the tool's purpose without any wasted words. It is front-loaded with the core functionality, making it easy for an agent to quickly understand what the tool does.

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

Completeness3/5

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

Given the tool's low complexity (0 parameters, no output schema, no annotations), the description is minimally adequate. It states what the tool does but lacks details on output format or behavioral context, which could be helpful for an agent to use it correctly. However, for a simple tool like this, the description meets basic requirements.

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

Parameters4/5

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

The input schema has 0 parameters with 100% coverage, meaning no parameters are documented in the schema. The description does not add parameter details, but since there are no parameters, this is acceptable. A baseline of 4 is appropriate as the description does not need to compensate for missing parameter information.

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 clearly states the specific verb ('Get') and resource ('current working directory'), making the purpose immediately understandable. It distinguishes itself from sibling tools like 'cd' (change directory) and 'ls' (list directory contents) by focusing on retrieval of the current location rather than navigation or listing.

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?

The description implies usage context by specifying 'current working directory,' suggesting it should be used to check the present location in the filesystem. However, it lacks explicit guidance on when to use it versus alternatives like 'ls' for listing contents or 'cd' for changing directories, leaving the agent to infer proper usage scenarios.

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/IBM/chuk-mcp-vfs'

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