Skip to main content
Glama
rubinsh

MCP Windows Screenshots

by rubinsh

get_screenshot

Retrieve specified screenshot file paths or base64-encoded content directly from Windows via WSL2, simplifying access and sharing without manual file navigation.

Instructions

Get a specific screenshot file path or content

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesFull path to the screenshot file
return_contentNoReturn base64 encoded content instead of just the path (default: false)

Implementation Reference

  • Handler function for the 'get_screenshot' tool. Validates input path, stats the file, and returns file metadata. If return_content is true, reads the file and returns base64-encoded content as data URL; otherwise, returns path and metadata with instructions.
    case 'get_screenshot': {
      const filePath = args?.path as string | undefined;
      const returnContent = (args?.return_content as boolean) || false;
      
      if (!filePath) {
        throw new Error('File path is required');
      }
      
      try {
        const stats = await stat(filePath);
        
        if (returnContent) {
          const content = await readFile(filePath);
          const base64 = content.toString('base64');
          const mimeType = path.extname(filePath as string).toLowerCase() === '.png' 
            ? 'image/png' 
            : 'image/jpeg';
          
          return {
            content: [
              {
                type: 'text',
                text: JSON.stringify({
                  path: filePath,
                  modified: stats.mtime.toISOString(),
                  size_kb: Math.round(stats.size / 1024),
                  content: `data:${mimeType};base64,${base64}`,
                }, null, 2),
              },
            ],
          };
        } else {
          return {
            content: [
              {
                type: 'text',
                text: JSON.stringify({
                  path: filePath,
                  modified: stats.mtime.toISOString(),
                  size_kb: Math.round(stats.size / 1024),
                  message: 'Use this path with Claude Code\'s Read tool to view the image',
                }, null, 2),
              },
            ],
          };
        }
      } catch (error) {
        throw new Error(`Failed to access screenshot: ${error}`);
      }
    }
  • src/index.ts:200-219 (registration)
    Tool registration in the tools list, defining name, description, and input schema for 'get_screenshot'. Used by the ListTools handler.
    {
      name: 'get_screenshot',
      description: 'Get a specific screenshot file path or content',
      inputSchema: {
        type: 'object',
        properties: {
          path: {
            type: 'string',
            description: 'Full path to the screenshot file',
          },
          return_content: {
            type: 'boolean',
            description: 'Return base64 encoded content instead of just the path (default: false)',
            default: false,
          },
        },
        required: ['path'],
      },
    },
    {
  • Input schema definition for the 'get_screenshot' tool, specifying required 'path' and optional 'return_content' parameters.
      inputSchema: {
        type: 'object',
        properties: {
          path: {
            type: 'string',
            description: 'Full path to the screenshot file',
          },
          return_content: {
            type: 'boolean',
            description: 'Return base64 encoded content instead of just the path (default: false)',
            default: false,
          },
        },
        required: ['path'],
      },
    },
    {
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the tool can return either a path or base64-encoded content, which adds some context beyond the input schema. However, it lacks details on error handling (e.g., what happens if the path is invalid), performance characteristics, or security considerations, leaving significant gaps for a file retrieval tool.

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

Conciseness5/5

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

The description is a single, efficient sentence that directly states the tool's function without unnecessary words. It's appropriately sized and front-loaded, making it easy to understand quickly. Every part of the sentence contributes to clarifying the purpose.

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

Completeness3/5

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

Given the tool's moderate complexity (2 parameters, no output schema, no annotations), the description is minimally adequate. It covers the basic purpose and hints at behavior, but lacks details on output format, error cases, or integration with siblings. Without annotations or output schema, more context would be helpful for safe and effective use.

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

Parameters3/5

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

Schema description coverage is 100%, so the input schema already fully documents both parameters (path and return_content). The description adds minimal value by hinting at the return options but doesn't provide additional syntax, format details, or examples beyond what's in the schema. This meets the baseline for high schema coverage.

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

Purpose4/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: 'Get a specific screenshot file path or content' with a specific verb ('Get') and resource ('screenshot file'). It distinguishes from sibling tools list_directories and list_screenshots by focusing on retrieving a specific file rather than listing items. However, it doesn't explicitly mention how it differs from siblings beyond the general action.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites like needing a valid file path, when to use return_content, or how it relates to sibling tools like list_screenshots for finding available screenshots. Usage is implied but not explicitly stated.

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

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/rubinsh/mcp-windows-screenshots'

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