Skip to main content
Glama
GongRzhe

Terminal Controller for MCP

get_current_directory

The tool retrieves the current working directory path on the MCP server, enabling users to track their location during terminal operations or file system navigation.

Instructions

Get current working directory Returns: Path of current working directory

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the 'get_current_directory' MCP tool. It simply returns the current working directory path using Python's os.getcwd(). The @mcp.tool() decorator registers this function as an MCP tool with the name matching the function name.
    @mcp.tool() async def get_current_directory() -> str: """ Get current working directory Returns: Path of current working directory """ return os.getcwd()

Other Tools

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

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