Skip to main content
Glama
@pixelvault-dev/local-mcp

@pixelvault-dev/local-mcp

Optimize local image

optimize_image

Compress, resize, and convert local images without uploads or API keys. Reduce file size before committing or attaching images, with optional format, quality, and dimension controls.

Instructions

Compress, resize and convert a LOCAL image file on this machine — no API key, nothing is uploaded. Use before committing or attaching an image, or when asked to make an image smaller. path is the file; optional format (keep|webp|avif|jpg|png, default keep), max_width/max_height (never upscales), quality (1-100, default 80), keep_metadata (EXIF/GPS is stripped by default), output_path or in_place, and dry_run to preview. Writes .optimized. next to the original by default and never makes a file bigger (an already-optimal file is left alone). Supports JPG/PNG/WebP/AVIF; for an image already hosted on PixelVault use transform_image (fmt/q/w) instead.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "path": "<path>"
    },
    "name": "optimize_image"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesLOCAL file path of the image to optimize (JPEG, PNG, WebP or AVIF). Absolute, or relative to the server's working directory.
formatNoOutput format. Default keep. WebP is usually the smallest for web use.
dry_runNoReport the saving without writing anything.
qualityNoJPEG/WebP/AVIF quality 1-100 (default 80). PNG output is always lossless.
in_placeNoOverwrite the original instead of writing a new file (only with format keep). Use only for files under version control.
max_widthNoDownscale to at most this width in px. Never upscales.
max_heightNoDownscale to at most this height in px. Never upscales.
output_pathNoWhere to write the result. Default: <name>.optimized.<ext> next to the original. Must not already exist unless it is a *.optimized.* file.
keep_metadataNoKeep EXIF/GPS metadata. Default false: it is stripped (orientation is applied first).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.8.0

TDQS

A4.5/5.0
Behavior5/5

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

No annotations exist, so the description carries the full burden and does so: it discloses that nothing is uploaded, that EXIF/GPS is stripped by default with orientation applied first, that it never makes a file bigger, that already-optimal files are left untouched, that in_place overwrites the original, and that dry_run previews without writing. It also states the default output naming convention.

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?

Front-loaded with the core action and safety framing, then a compact parameter digest. Slight waste comes from re-listing defaults already present in the schema, which lengthens an otherwise tight definition.

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?

Covers input semantics, defaults, supported formats, and side effects for a 9-parameter mutation tool with no annotations. The only gap is what a call returns (savings report, resulting path), which is not described and there is no output schema.

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 every parameter is already documented with defaults and ranges. The description mostly restates those defaults (quality 80, keep, never upscales, metadata stripped) rather than adding new meaning, so it lands at the baseline for a fully documented 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?

States specific verbs and resource: "Compress, resize and convert a LOCAL image file on this machine." The LOCAL/no-upload framing immediately separates it from the hosted-image sibling transform_image, so an agent can route without opening either schema.

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

Usage Guidelines5/5

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

Gives concrete triggering conditions ("before committing or attaching an image, or when asked to make an image smaller") and explicitly names the alternative plus its distinguishing parameters: "for an image already hosted on PixelVault use transform_image (fmt/q/w) instead." Both when-to-use and when-not-to-use are covered.

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