Skip to main content
Glama

take_screenshot

Capture and retrieve screenshots of a user's screen for AI-driven analysis and assistance using the MCP 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 implementation of the take_screenshot tool: captures screen using pyautogui, converts to JPEG, and returns as 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 a thin wrapper handler 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()
  • Import of the take_screenshot function used by the tool handler.
    from screenshot_mcp_server.tools.screenshot import take_screenshot

Other Tools

Related 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