pyodide_get-mount-points
List mounted directories in Pyodide to manage file system access for Python code execution by LLMs.
Instructions
List mounted directories
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": "pyodide_get-mount-points"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- Core implementation of the pyodide_get-mount-points tool that retrieves the list of mounted directories from the internal mountPoints Map and formats the response.
async getMountPoints() { if (!this.pyodide) { return formatCallToolError("Pyodide not initialized"); } try { const mountPoints = Array.from(this.mountPoints.entries()).map( ([name, config]) => ({ name, hostPath: config.hostPath, mountPoint: config.mountPoint, }) ); return formatCallToolSuccess(JSON.stringify(mountPoints, null, 2)); } catch (error) { return formatCallToolError(error); } } - src/handlers/index.ts:105-108 (handler)MCP server request handler switch case that dispatches the pyodide_get-mount-points tool call to PyodideManager.getMountPoints().
case "pyodide_get-mount-points": { const results = await pyodideManager.getMountPoints(); return results; } - src/tools/index.ts:40-47 (schema)Tool schema and metadata definition, specifying the name, description, and empty input schema (no arguments required).
export const GET_MOUNT_POINTS_TOOL: Tool = { name: "pyodide_get-mount-points", description: "List mounted directories", inputSchema: { type: "object", properties: {}, }, }; - src/handlers/index.ts:32-38 (registration)Tool registration in the TOOLS array exported for the ListTools MCP request handler.
const TOOLS: Tool[] = [ tools.EXECUTE_PYTHON_TOOL, tools.INSTALL_PYTHON_PACKAGES_TOOL, tools.GET_MOUNT_POINTS_TOOL, tools.LIST_MOUNTED_DIRECTORY_TOOL, tools.READ_IMAGE_TOOL, ];