Skip to main content
Glama
nextframedev

EXIF MCP Server

by nextframedev

inspect_exif_detailed

Reads EXIF metadata and provides per-tag references to enable selective removal of sensitive data from images.

Instructions

Read EXIF metadata with per-tag references for selective cleanup.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
image_pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
image_pathYes
has_exifYes
exifYes
warningsYes
tagsYes

Implementation Reference

  • MCP tool handler function for 'inspect_exif_detailed'. Wraps read_exif_detailed from the core layer with error handling.
    def inspect_exif_detailed(image_path: str) -> InspectExifDetailedResult:
        """Read EXIF metadata with per-tag references for selective cleanup."""
    
        return run_with_mcp_error_handling(
            "inspect_exif_detailed",
            lambda: read_exif_detailed(image_path=image_path),
        )
  • Core implementation of the detailed EXIF read. Loads EXIF dict, flattens into JSON-friendly format, and produces per-tag details via _tag_details().
    def read_exif_detailed(image_path: str) -> InspectExifDetailedResult:
        """Read all EXIF metadata from one image with per-tag references."""
    
        normalized_path, exif_dict = _load_exif_dict(image_path)
        flattened_exif, warnings = _flatten_exif(exif_dict)
        return {
            "image_path": str(normalized_path),
            "has_exif": _has_any_exif(exif_dict),
            "exif": flattened_exif,
            "warnings": warnings,
            "tags": _tag_details(exif_dict),
        }
  • Builds the per-tag detail list used by read_exif_detailed, including stable tag references (ifd, tag_id, field_name, field_key, value).
    def _tag_details(exif_dict: dict[str, dict[int, Any]]) -> list[ExifTagDetail]:
        """Return stable per-tag EXIF details including removal-friendly references."""
    
        details: list[ExifTagDetail] = []
        seen_field_names: set[str] = set()
    
        for ifd_name in EXIF_IFD_ORDER:
            for tag_id, raw_value in exif_dict.get(ifd_name, {}).items():
                field_name = _tag_name(ifd_name, tag_id)
                if field_name in STRUCTURAL_TIFF_FIELDS:
                    continue
                field_key = field_name
                if field_name in seen_field_names:
                    field_key = f"{ifd_name}.{field_name}"
                seen_field_names.add(field_name)
                details.append(
                    {
                        "ifd": ifd_name,
                        "tag_id": tag_id,
                        "field_name": field_name,
                        "field_key": field_key,
                        "value": _convert_exif_value(raw_value),
                    }
                )
    
        return details
  • TypedDict schema for InspectExifDetailedResult (return type of inspect_exif_detailed tool).
    class InspectExifDetailedResult(TypedDict):
        """Detailed EXIF inspection result with per-tag references."""
    
        image_path: str
        has_exif: bool
        exif: dict[str, Any]
        warnings: list[str]
        tags: list[ExifTagDetail]
  • Registration of inspect_exif_detailed as an MCP server tool via server.tool() 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)
Behavior2/5

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

With no annotations provided, the description carries full burden but only states read intent; it does not disclose any behavioral traits such as permissions, idempotency, or side effects. The mention of 'selective cleanup' hints at output structure but is insufficient.

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

Conciseness4/5

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

The description is a single concise sentence with front-loaded key action, but lacks structured detail. It is appropriately sized for a simple tool.

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 simplicity (1 param, output schema exists) and many siblings, the description is minimally complete for a read operation, but fails to explain what 'per-tag references' are or how they aid cleanup.

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?

The single parameter 'image_path' has 0% schema description coverage, and the description adds no additional context about valid formats, constraints, or examples beyond the schema's basic type.

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 action ('Read') and the resource ('EXIF metadata'), and adds a distinguishing feature ('with per-tag references for selective cleanup') that differentiates it from the sibling tool 'inspect_exif'.

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, lacks prerequisites or exclusions, and does not reference any siblings.

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