Skip to main content
Glama
hermesagent

mcp-hermes

Official
by hermesagent

screenshot_url

Capture a screenshot of any public web page and receive it as a base64-encoded image. Configure viewport size, image format, and full page option to verify rendering, debug UI, or extract visual information.

Instructions

Capture a screenshot of any web page and return it as a base64-encoded image.

Use this when you need to:

  • See what a website looks like visually

  • Verify a page rendered correctly

  • Capture UI state for debugging or documentation

  • Extract visual information from a web page

Args: url: The URL to screenshot (must be publicly accessible) width: Viewport width in pixels (default: 1280) height: Viewport height in pixels (default: 800) format: Image format - 'png' or 'jpeg' (default: 'png') full_page: Capture the full page height, not just the viewport (default: False)

Returns: Base64-encoded image data with data URI prefix, ready to display. Example: "data:image/png;base64,iVBORw0KGgo..."

Rate limits: 10/day free tier. Get a free API key at https://hermesforge.dev/api/keys for 100/day. Paid plans available for higher volume.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYes
widthNo
heightNo
formatNopng
full_pageNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The screenshot_url tool handler function. It captures a screenshot of a given URL by calling the Hermesforge API, and returns the image as a base64-encoded data URI. Registered via @mcp.tool() decorator on line 44.
    @mcp.tool()
    def screenshot_url(
        url: str,
        width: int = 1280,
        height: int = 800,
        format: str = "png",
        full_page: bool = False,
    ) -> str:
        """
        Capture a screenshot of any web page and return it as a base64-encoded image.
    
        Use this when you need to:
        - See what a website looks like visually
        - Verify a page rendered correctly
        - Capture UI state for debugging or documentation
        - Extract visual information from a web page
    
        Args:
            url: The URL to screenshot (must be publicly accessible)
            width: Viewport width in pixels (default: 1280)
            height: Viewport height in pixels (default: 800)
            format: Image format - 'png' or 'jpeg' (default: 'png')
            full_page: Capture the full page height, not just the viewport (default: False)
    
        Returns:
            Base64-encoded image data with data URI prefix, ready to display.
            Example: "data:image/png;base64,iVBORw0KGgo..."
    
        Rate limits: 10/day free tier. Get a free API key at https://hermesforge.dev/api/keys
        for 100/day. Paid plans available for higher volume.
        """
        params = {
            "url": url,
            "width": width,
            "height": height,
            "format": format,
            "full_page": str(full_page).lower(),
        }
    
        try:
            resp = requests.get(
                f"{API_BASE}/api/screenshot",
                params=params,
                headers=_auth_headers(),
                timeout=30,
            )
        except requests.RequestException as e:
            return f"Error: Could not reach Hermesforge API: {e}"
    
        if resp.status_code == 200:
            img_bytes = resp.content
            b64 = base64.b64encode(img_bytes).decode()
            mime = "image/jpeg" if format == "jpeg" else "image/png"
            return f"data:{mime};base64,{b64}"
        elif resp.status_code == 429:
            try:
                msg = resp.json().get("message", "")
            except Exception:
                msg = ""
            return (
                f"Rate limit reached. {msg} "
                f"Get a free API key at https://hermesforge.dev/api/keys "
                f"or see plans at https://hermesforge.dev/pricing"
            )
        elif resp.status_code == 402:
            return (
                f"Payment required. This endpoint uses x402 micropayments. "
                f"See https://hermesforge.dev/pricing for API key options."
            )
        else:
            return f"Error: API returned {resp.status_code}: {resp.text[:200]}"
  • The @mcp.tool() decorator on line 44 registers screenshot_url as an MCP tool with the FastMCP server.
    @mcp.tool()
  • Helper function that builds authentication headers using the HERMESFORGE_API_KEY environment variable, used by the screenshot_url handler.
    def _auth_headers() -> dict:
        if API_KEY:
            return {"X-API-Key": API_KEY}
        return {}
Behavior4/5

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

Discloses rate limits (10/day free), requires publicly accessible URLs, and describes the return format with an example. No annotations provided, so description carries the burden and does it well.

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

Conciseness4/5

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

Well-structured bullet points covering purpose, usage, parameters, returns, and rate limits. Could be slightly more concise, but front-loads key info.

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?

Comprehensive for a screenshot tool: includes usage context, parameter details, return format, example, rate limit info. Output schema exists but description already explains return value.

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?

Adds meaning for each parameter: url must be publicly accessible, width/height define viewport, format is png/jpeg, full_page captures full height. Schema has 0% coverage, so description compensates fully.

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?

Clearly states it captures screenshots of web pages and returns base64-encoded image. The verb 'screenshot' and resource 'url' are specific, and it is distinct from siblings 'get_api_usage' and 'render_chart'.

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?

Lists explicit use cases (see website, verify rendering, capture UI, extract visual info). Does not explicitly state when not to use or alternatives, but the context is clear.

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/hermesagent/hermesforge-mcp'

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