Skip to main content
Glama
GongRzhe

Terminal Controller for MCP

get_current_directory

Retrieve the current working directory path to identify your location in the file system for navigation and command execution.

Instructions

Get current working directory Returns: Path of current working directory

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'get_current_directory' tool, decorated with @mcp.tool() for automatic registration in the MCP server. It returns the current working directory path as a string using os.getcwd(). The docstring provides the tool description and return type information.
    @mcp.tool() async def get_current_directory() -> str: """ Get current working directory Returns: Path of current working directory """ return os.getcwd()

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/GongRzhe/terminal-controller-mcp'

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