Skip to main content
Glama

take_screenshot

Capture screen content as an image to enable AI assistants to see and analyze what users are viewing through a simple interface.

Instructions

Take a screenshot of the user's screen and return it as an image

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Core handler function that implements the screenshot capture logic using pyautogui, processes the image into a JPEG buffer, and returns it as an MCP Image object.
    def take_screenshot() -> Image:
        """
        Take a screenshot of the user's screen and return it as an image. Use
        this tool anytime the user wants to look at something they're doing.
        """
        import pyautogui
    
        buffer = io.BytesIO()
        # if the file exceeds ~1MB, it will be rejected by Claude
        screenshot = pyautogui.screenshot()
        screenshot.convert("RGB").save(buffer, format="JPEG", quality=60, optimize=True)
    
        return Image(data=buffer.getvalue(), format="jpeg")
  • Registers the 'take_screenshot' MCP tool with the server, providing the name, description, and a thin wrapper function that delegates to the core implementation.
    @mcp_server.tool(
        name="take_screenshot",
        description="Take a screenshot of the user's screen and return it as an image",
    )
    def screenshot_tool() -> Image:
        """Wrapper around the screenshot tool implementation"""
        return take_screenshot()
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/codingthefuturewithai/screenshot_mcp_server'

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