open_image_locally
Open saved Street View images in your default viewer application to examine captured locations and landmarks from virtual tours.
Instructions
Open a saved Street View image in the default application.
Args: filename: The filename of the image to open (must exist in output directory)
Returns: Dict: A status message indicating success or failure
Raises: ValueError: If the file doesn't exist in the output directory
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filename | Yes |
Implementation Reference
- src/street_view_mcp/server.py:127-152 (handler)The core handler function for the 'open_image_locally' tool. Decorated with @mcp.tool() for automatic registration in FastMCP. Validates the image file exists in the output directory, converts to URI, and opens it in the default local application using webbrowser.open(). Returns success status.@mcp.tool() def open_image_locally(filename: str) -> Dict[str, str]: """ Open a saved Street View image in the default application. Args: filename: The filename of the image to open (must exist in output directory) Returns: Dict: A status message indicating success or failure Raises: ValueError: If the file doesn't exist in the output directory """ # Check if file exists image_path = OUTPUT_DIR / filename if not image_path.exists(): raise ValueError(f"Image file '{filename}' does not exist in the output directory") # Convert to absolute path abs_path = image_path.absolute().as_uri() # Open in local application webbrowser.open(abs_path) return {"status": "success", "message": f"Opened {filename} in default application"}