Skip to main content
Glama

pwd

Display the current working directory path to help users navigate and manage files within virtual filesystem workspaces.

Instructions

Get current working directory.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Core handler function that retrieves the current working directory from the workspace manager and returns a 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)
  • MCP tool registration for 'pwd' using the @server.tool decorator, which delegates to the VFSTools.pwd method.
    @server.tool async def pwd(): """Get current working directory.""" return await vfs_tools.pwd()
  • Pydantic model defining the response schema for the pwd tool, containing the 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