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
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- terminal_controller.py:170-178 (handler)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()