Skip to main content
Glama
vlad-ds

Street View MCP

by vlad-ds

create_html_page

Generate HTML pages to display Street View images with descriptive text, creating virtual tours or location showcases by compiling multiple images into a single document.

Instructions

Create an HTML page specifically for displaying Street View images with descriptive text.

This tool is designed to compile multiple Street View images into a single viewable HTML document, creating a virtual tour or location showcase. The function automatically wraps your content in a complete HTML document with:

  • DOCTYPE declaration

  • HTML, head, and body tags

  • Basic responsive styling optimized for displaying images

  • Title from the parameter

Args: html_elements: List of content HTML elements (just the body content, no need for HTML structure) filename: Name of the HTML file to create (without directory path) title: Title for the HTML page

Returns: Dict: A status message indicating success or failure

Raises: ValueError: If the filename already exists or is invalid

Note: - You only need to provide the CONTENT elements (no need for html, head, body tags) - IMPORTANT: When including Street View images, you MUST use the path "../output/": <img src="../output/empire.jpg" alt="Empire State Building"> - The "../" prefix is REQUIRED because HTML files are in html/ directory while images are in output/ directory (both at the same level)

Example usage: ``` # Create a virtual Street View tour with multiple locations html_elements = [ "New York City Landmarks Tour", "Explore famous landmarks through Street View images.",

    "<h2>Empire State Building</h2>",
    "<img src='../output/empire.jpg' alt='Empire State Building'>",
    "<p class='location'>350 Fifth Avenue, New York, NY</p>",
    "<p class='description'>This 102-story Art Deco skyscraper in Midtown Manhattan was completed in 1931.</p>",
    
    "<h2>Times Square</h2>",
    "<img src='../output/timessquare.jpg' alt='Times Square'>",
    "<p class='location'>Broadway & 7th Avenue, New York, NY</p>", 
    "<p class='description'>Famous for its bright lights, Broadway theaters, and as the site of the annual New Year's Eve ball drop.</p>"
]
```

HTML Boilerplate (automatically added): <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>{title}</title> <style> body { font-family: Arial, sans-serif; line-height: 1.6; max-width: 800px; margin: 0 auto; padding: 20px; color: #333; } img { max-width: 100%; height: auto; border-radius: 5px; margin: 20px 0; } h1, h2, h3 { color: #2c3e50; } </style> </head> <body> <!-- Your content elements are inserted here --> </body> </html>

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
html_elementsYes
filenameYes
titleNoStreet View Tour

Implementation Reference

  • The @mcp.tool()-decorated function that implements the create_html_page tool. It generates a complete HTML page from provided html_elements, saves it to the html directory, and opens it in the browser. The schema is inferred from the function signature: html_elements (List[str]), filename (str), title (str optional).
    @mcp.tool()
    def create_html_page(html_elements: List[str], filename: str, title: str = "Street View Tour") -> Dict[str, str]:
        """
        Create an HTML page specifically for displaying Street View images with descriptive text.
        
        This tool is designed to compile multiple Street View images into a single viewable 
        HTML document, creating a virtual tour or location showcase. The function automatically 
        wraps your content in a complete HTML document with:
        - DOCTYPE declaration
        - HTML, head, and body tags
        - Basic responsive styling optimized for displaying images
        - Title from the parameter
        
        Args:
            html_elements: List of content HTML elements (just the body content, no need for HTML structure)
            filename: Name of the HTML file to create (without directory path)
            title: Title for the HTML page
            
        Returns:
            Dict: A status message indicating success or failure
            
        Raises:
            ValueError: If the filename already exists or is invalid
            
        Note:
            - You only need to provide the CONTENT elements (no need for html, head, body tags)
            - IMPORTANT: When including Street View images, you MUST use the path "../output/":
              `<img src="../output/empire.jpg" alt="Empire State Building">`
            - The "../" prefix is REQUIRED because HTML files are in html/ directory while 
              images are in output/ directory (both at the same level)
              
        Example usage:
            ```
            # Create a virtual Street View tour with multiple locations
            html_elements = [
                "<h1>New York City Landmarks Tour</h1>",
                "<p>Explore famous landmarks through Street View images.</p>",
                
                "<h2>Empire State Building</h2>",
                "<img src='../output/empire.jpg' alt='Empire State Building'>",
                "<p class='location'>350 Fifth Avenue, New York, NY</p>",
                "<p class='description'>This 102-story Art Deco skyscraper in Midtown Manhattan was completed in 1931.</p>",
                
                "<h2>Times Square</h2>",
                "<img src='../output/timessquare.jpg' alt='Times Square'>",
                "<p class='location'>Broadway & 7th Avenue, New York, NY</p>", 
                "<p class='description'>Famous for its bright lights, Broadway theaters, and as the site of the annual New Year's Eve ball drop.</p>"
            ]
            ```
            
        HTML Boilerplate (automatically added):
            ```
            <!DOCTYPE html>
            <html lang="en">
            <head>
                <meta charset="UTF-8">
                <meta name="viewport" content="width=device-width, initial-scale=1.0">
                <title>{title}</title>
                <style>
                    body {
                        font-family: Arial, sans-serif;
                        line-height: 1.6;
                        max-width: 800px;
                        margin: 0 auto;
                        padding: 20px;
                        color: #333;
                    }
                    img {
                        max-width: 100%;
                        height: auto;
                        border-radius: 5px;
                        margin: 20px 0;
                    }
                    h1, h2, h3 {
                        color: #2c3e50;
                    }
                </style>
            </head>
            <body>
                <!-- Your content elements are inserted here -->
            </body>
            </html>
            ```
        """
        # Validate filename
        if not filename.endswith('.html'):
            filename += '.html'
        
        # Create full path
        file_path = HTML_DIR / filename
        
        # Check if file already exists
        if file_path.exists():
            raise ValueError(f"File {file_path} already exists")
        
        # Ensure directory exists
        HTML_DIR.mkdir(parents=True, exist_ok=True)
        
        # Combine HTML elements
        content = '\n'.join(html_elements)
        
        # HTML template with format placeholder
        html_template = """<!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>{title}</title>
        <style>
            body {{
                font-family: Arial, sans-serif;
                line-height: 1.6;
                max-width: 800px;
                margin: 0 auto;
                padding: 20px;
                color: #333;
            }}
            img {{
                max-width: 100%;
                height: auto;
                border-radius: 5px;
                margin: 20px 0;
            }}
            h1, h2, h3 {{
                color: #2c3e50;
            }}
            .location {{
                font-weight: bold;
                margin-bottom: 5px;
            }}
            .description {{
                margin-bottom: 30px;
            }}
        </style>
    </head>
    <body>
    {content}
    </body>
    </html>
    """
        
        # Format the template with content and title
        html_content = html_template.format(title=title, content=content)
        
        # Write to file
        with open(file_path, 'w') as f:
            f.write(html_content)
        
        # Open in browser
        abs_path = file_path.absolute().as_uri()
        webbrowser.open(abs_path)
        
        return {"status": "success", "message": f"Created and opened {filename}"}
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden and does an excellent job disclosing behavioral traits. It explains what gets created (complete HTML document with specific structure), includes important constraints (filename validation, path requirements for images), and describes error conditions (ValueError for existing/invalid filenames). It also shows the complete boilerplate that will be automatically added.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is comprehensive but could be more front-loaded. While all information is valuable, the detailed example and boilerplate sections make it quite lengthy. The core information is presented early, but the overall structure includes multiple sections that could potentially be streamlined.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 3-parameter tool with no annotations and no output schema, the description provides exceptional completeness. It covers purpose, usage, parameters, constraints, examples, and even shows the exact HTML structure that will be generated. The return value is clearly explained ('Dict: A status message indicating success or failure'), and error conditions are documented.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description fully compensates by providing detailed parameter explanations. It clarifies that html_elements should be 'just the body content, no need for HTML structure,' specifies filename format 'without directory path,' and explains the title parameter's role. The example usage provides concrete parameter values and formatting guidance.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Create an HTML page specifically for displaying Street View images with descriptive text.' It specifies the verb ('create'), resource ('HTML page'), and distinguishes from siblings by focusing on Street View image compilation rather than metadata retrieval or image viewing.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context for when to use this tool: for compiling multiple Street View images into a viewable HTML document for virtual tours or showcases. It doesn't explicitly state when not to use it or name alternatives among siblings, but the specific use case is well-defined.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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/vlad-ds/street-view-mcp'

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