Skip to main content
Glama

Image Reader MCP Server

A simple MCP server built with FastMCP that provides tools to:

  • List image files in a specified directory.

  • Read a specific image file and return its content.

Tools

This server provides the following tools:

list_images

  • Description: List image files in a specified directory.

  • Parameters:

    • directoryPath (string): The absolute path to the directory to scan for images.

  • Returns: A list of image filenames found in the directory or a message indicating no images were found.

  • Supported Extensions: .jpg, .jpeg, .png, .gif, .bmp, .webp, .svg

read_image

  • Description: Reads a specific image file and returns its content as base64.

  • Parameters:

    • filePath (string): The absolute path to the image file to read.

  • Returns: An object containing the image content suitable for display (using imageContent helper from fastmcp).

  • Supported Extensions: .jpg, .jpeg, .png, .gif, .bmp, .webp, .svg

Setup

To configure an MCP client, add the imageReader entry to the mcpServers object. It should look something like this:

{
  "mcpServers": {
    // ... other servers might be here ...
    "imageReader": {
      "command": "npx",
      "args": ["image-reader-mcp"],
      "env": {}
    }
  }
}

Important Note: When using this server with Cursor, it currently seems to function only when Claude Sonnet is selected (other models don't seem to have vision enabled).

Available Tools

2 tools
list_imagesB

List image files in a specified directory.

ParametersJSON Schema
NameRequiredDescriptionDefault
directoryPathYesThe absolute path to the directory to scan for images.

TDQS

B3.3/5.0
Behavior2/5

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

No annotations are present, so the description carries the full burden of behavioral disclosure. It only states the operation without indicating whether it is read-only, whether it scans subdirectories, or how results are formatted. This lack of detail could leave the agent uncertain about side effects or limitations.

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 sentence that is front-loaded with the core action. Every word earns its place, and there is no unnecessary repetition or padding.

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?

For a simple one-parameter tool, the description is adequate but leaves gaps. There is no output schema, so the description should mention what the tool returns (e.g., list of image paths). It also does not clarify which image extensions are considered or whether it includes hidden files/subdirectories. The sibling tool is not addressed, reducing context.

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%, with directoryPath already documented. The description does not add additional meaning beyond the schema, merely echoing 'specified directory.' It meets the baseline for a well-covered schema but does not enhance parameter understanding.

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?

The description clearly states the tool's purpose: 'List image files in a specified directory.' The verb 'List' and resource 'image files' are specific, and it distinguishes from the sibling tool read_image, which implies reading/operating on a single image.

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?

No explicit guidance is provided on when to use this tool versus alternatives. The sibling tool read_image is not mentioned, and there is no description of appropriate scenarios or exclusions. The context implies usage but does not clarify how it differs from read_image.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

read_imageA

Reads a specific image file and returns its content as base64.

ParametersJSON Schema
NameRequiredDescriptionDefault
filePathYesThe absolute path to the image file to read.

TDQS

A3.9/5.0
Behavior3/5

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

Without annotations, the description carries the burden of disclosure. It reveals the output format (base64) and that it is a read operation, but it does not mention potential failures (e.g., file not found), permissions, or other behavioral details. This is minimal but acceptable for a simple read 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, concise sentence that front-loads the action and result. No filler words or redundancy.

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?

For a tool with one parameter, no output schema, and no annotations, the description fully covers purpose, input, and output format. It is complete enough for an agent to understand and invoke the tool correctly.

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?

The input schema already provides a description for filePath ('The absolute path to the image file to read') with 100% coverage. The tool description adds no additional parameter meaning, so the baseline score of 3 applies.

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?

The description clearly states the tool reads a specific image file and returns its content as base64, using a specific verb and resource. It also distinguishes itself from sibling list_images by specifying 'specific image file'.

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

Usage Guidelines3/5

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

The description implicitly conveys that this tool is for reading a known file path, contrasting with listing images. However, it does not explicitly mention when to use this tool over list_images or provide any exclusions or alternatives, so the guidance is only implied.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 2 tool updatesv1.0.5
    • First observedlist_images
    • First observedread_image

TDQS

A3.8/5.0

Scored across 2 tools

Disambiguation5/5

list_images and read_image are clearly distinct: one discovers images in a directory, the other retrieves the content of a specific image. There is no overlap or ambiguity between them.

Naming Consistency5/5

Both tool names follow a verb_noun pattern (list_images, read_image), using snake_case consistently. The naming is predictable and easy to infer.

Tool Count3/5

With only two tools, the server feels minimal, which is borderline for a tool set. However, for an image reader, listing and reading are the essential operations, so the count is appropriate for the narrow scope, but still falls into the 'thin' category.

Completeness5/5

The server's purpose is to read images, and it provides the two core operations: enumerating available images and reading a specific one. There are no obvious gaps for this use case; it covers the full lifecycle of reading (discover then retrieve).

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers