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

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

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