Skip to main content
Glama
upnorthmedia

Screenshot MCP

by upnorthmedia

list_device_presets

Retrieve available device configurations for responsive website screenshot capture, enabling selection of specific screen sizes and settings.

Instructions

List available device presets with their configurations

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler for the 'list_device_presets' tool. It processes the DEVICE_PRESETS constant, formats it into a readable list, and returns it as text content.
    case 'list_device_presets': const presetsList = Object.entries(DEVICE_PRESETS).map(([name, config]) => ({ name, ...config })); return { content: [ { type: 'text', text: 'Available device presets:\n\n' + presetsList.map(preset => `**${preset.name}**\n` + `- Dimensions: ${preset.width}x${preset.height}\n` + `- Scale: ${preset.deviceScaleFactor}x\n` + `- Mobile: ${preset.isMobile}\n` + `- Touch: ${preset.hasTouch}\n` ).join('\n') } ] };
  • Input schema for the 'list_device_presets' tool, which takes no parameters.
    inputSchema: { type: 'object', properties: {}, additionalProperties: false }
  • index.js:167-175 (registration)
    Registration of the 'list_device_presets' tool in the tools array used for ListToolsRequest.
    { name: 'list_device_presets', description: 'List available device presets with their configurations', inputSchema: { type: 'object', properties: {}, additionalProperties: false } }
  • DEVICE_PRESETS constant that provides the device configurations listed by the tool handler.
    export const DEVICE_PRESETS = { mobile: { width: 375, height: 667, deviceScaleFactor: 2, isMobile: true, hasTouch: true, userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0 Mobile/15A372 Safari/604.1' }, tablet: { width: 768, height: 1024, deviceScaleFactor: 2, isMobile: true, hasTouch: true, userAgent: 'Mozilla/5.0 (iPad; CPU OS 14_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0 Mobile/15A372 Safari/604.1' }, desktop: { width: 1920, height: 1080, deviceScaleFactor: 1, isMobile: false, hasTouch: false, userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36' } };

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/upnorthmedia/ScreenshotMCP'

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