Skip to main content
Glama
nextframedev

EXIF MCP Server

by nextframedev

has_gps_exif

Check whether an image contains GPS or location EXIF fields. Determines if location data is embedded in the image's metadata.

Instructions

Check whether an image contains GPS/location EXIF fields.

This tool is read-only and must not modify the target file.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
image_pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
image_pathYes
has_gpsYes
gps_fields_presentYes

Implementation Reference

  • MCP tool handler for has_gps_exif - delegates to detect_gps_exif via error-handling wrapper
    def has_gps_exif(image_path: str) -> HasGpsExifResult:
        """Check whether an image contains GPS/location EXIF fields.
    
        This tool is read-only and must not modify the target file.
        """
    
        return run_with_mcp_error_handling(
            "has_gps_exif",
            lambda: detect_gps_exif(image_path=image_path),
        )
  • Core helper - loads EXIF and returns whether GPS fields are present
    def detect_gps_exif(image_path: str) -> HasGpsExifResult:
        """Detect whether GPS EXIF fields are present on the image."""
    
        normalized_path, exif_dict = _load_exif_dict(image_path)
        gps_fields_present = _gps_field_names(exif_dict)
        return {
            "image_path": str(normalized_path),
            "has_gps": bool(gps_fields_present),
            "gps_fields_present": gps_fields_present,
        }
  • TypedDict schema defining the return type of has_gps_exif
    class HasGpsExifResult(TypedDict):
        """Contract for the has_gps_exif MCP tool."""
    
        image_path: str
        has_gps: bool
        gps_fields_present: list[str]
  • Registration of has_gps_exif as an MCP tool on the server via decorator
    def register_inspection_tools(server: Any) -> None:
        """Register inspection tools on the provided MCP server instance."""
    
        server.tool()(inspect_exif)
        server.tool()(has_gps_exif)
        server.tool()(inspect_exif_detailed)
        server.tool()(find_images_with_gps_exif)
        server.tool()(find_images_with_exif_fields)
  • Helper that extracts human-readable GPS field names from the EXIF GPS IFD
    def _gps_field_names(exif_dict: dict[str, dict[int, Any]]) -> list[str]:
        """Return stable readable names for GPS fields present in EXIF metadata."""
    
        gps_fields = [_tag_name("GPS", tag_id) for tag_id in exif_dict.get("GPS", {})]
        return sorted(gps_fields)
Behavior4/5

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

No annotations provided, but the description discloses the tool is read-only and non-destructive. This adequately informs the agent of behavioral traits, though it could add details about return value for non-image files.

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?

Two sentences, no unnecessary words. The purpose is front-loaded and every sentence serves a clear function.

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

Completeness4/5

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

Given no annotations and an output schema (likely indicating boolean return), the description is minimally complete. It could mention the boolean return value or error handling, but is sufficient for the simple tool.

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

Parameters2/5

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

Schema description coverage is 0% and the description does not explain the image_path parameter. The AI must rely solely on the schema, which lacks a description. This fails to add value beyond the schema.

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 checks for GPS/location EXIF fields, using a specific verb and resource. It distinguishes from siblings like batch_strip_exif and find_images_with_gps_exif.

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

Usage Guidelines4/5

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

The description explicitly states the tool is read-only and must not modify files, guiding appropriate use. However, it does not mention alternatives like strip_exif when removal is needed.

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

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/nextframedev/exif_mcp_server'

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