Skip to main content
Glama

Optimize photos

optimize_images
Destructive

Clean up the photos already in the draft (uploaded before automatic clean-up, or added with write_file): turned upright, location and camera data removed, resized to at most 2000 px, and smaller WebP copies made that phones load automatically. Photos that are already done are skipped. Publish afterwards to make the live site faster.

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": {
      "site": "<site>"
    },
    "name": "optimize_images"
  }
}

Input Schema

NameRequiredDescriptionDefault
siteYesSite slug (e.g. "kopitiam-muar") or id

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already flag destructiveHint=true and readOnlyHint=false, and the description adds real value on top: EXIF location/camera data is stripped, images are capped at 2000 px, and WebP derivatives are generated. That is meaningful disclosure of irreversible loss for a destructive tool. Minor gap: it doesn't say whether the original full-resolution file is retained or replaced, which matters most for a destructive operation.

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 action, then a compact list of effects, then skip behavior and the publish follow-up. The opening sentence is long and its parenthetical is dense, but no sentence is redundant.

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?

For a one-parameter, no-output-schema tool, the description covers the transformations, idempotency, and the required follow-up step, which is enough to call it correctly. The remaining unknown is the fate of original files and whether processing is immediate or queued.

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?

Only one parameter (the site slug/id) and the schema already documents it at 100% coverage, so baseline 3 applies. The description never mentions the site argument or any scoping behavior, adding nothing 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?

States a specific verb and resource ('Clean up the photos already in the draft') and enumerates the concrete transformations applied. The parenthetical '(uploaded before automatic clean-up, or added with write_file)' explicitly bounds which photos qualify and nods at the sibling that adds photos, so an agent can separate this from add_image/write_file without opening a schema.

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?

Usage timing is clear: run it on draft photos, and 'Publish afterwards to make the live site faster' gives the follow-up step. 'Photos that are already done are skipped' tells the agent re-invocation is safe/idempotent. Lacks an explicit exclusion (e.g. what to do if no photos exist or if a photo must keep its metadata).

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources