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
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_current_directory"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- terminal_controller.py:170-171 (registration)The tool is registered via the @mcp.tool() decorator on line 170, which automatically registers it with the FastMCP server.
@mcp.tool() async def get_current_directory() -> str: - terminal_controller.py:171-178 (handler)The handler function 'get_current_directory' is an async function that returns the current working directory by calling os.getcwd().
async def get_current_directory() -> str: """ Get current working directory Returns: Path of current working directory """ return os.getcwd() - terminal_controller.py:171-177 (schema)The function signature and docstring define the schema: no parameters, returns a string with the path of the current working directory.
async def get_current_directory() -> str: """ Get current working directory Returns: Path of current working directory """