MCP server for TinyPNG image compression and resizing
The server defines 3 tools with explicit schemas and descriptions in src/tools.ts. All tools have action-verb names (compress_*, resize_*) and input schemas with proper JSON Schema structure. However, there are significant gaps: (1) parameter descriptions lack actionable detail, most are minimal and do not explain constraints, defaults, or error cases; (2) output schemas are completely absent from tool definitions, the tool handlers return objects, but the Tool definitions do not document what fields are returned, forcing LLMs to guess; (3) error handling is minimal, no guidance on recovery, retryability, or user-fixable vs fatal errors; (4) several parameters lack descriptions entirely (e.g., preserveMetadata array items have no description); (5) no documentation of API key injection or security model; (6) parameter constraints like metadata enum values are present but not explained in descriptions. The code is functional and schemas are complete, but the definitions lack the detail needed for reliable LLM reasoning.
Compress a local image file
Compress a remote image file by giving the URL of the image
Resize an image file
Output schemas are not documented in tool definitions. Tool handlers return objects with fields (originalSize, compressedSize, compressionRatio), but the Tool objects do not declare outputSchema. LLMs cannot infer what fields to expect and cannot plan downstream tool calls or extractions.
Parameter descriptions lack actionable constraint details. E.g., 'outputPath: The ABSOLUTE path to save...' does not explain whether the file is overwritten if it exists, whether the directory must exist, or what happens on permission errors. Descriptions should include: format, range, constraints, and error cases.
No error guidance in tool descriptions. If API key is missing or quota exceeded (TinyPNG has monthly limits), the LLM receives a raw error with no recovery hint. Tool descriptions should state: 'Returns error if API key is missing or if monthly compression quota exceeded.'
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-21 | D | 54 | <=2025-11-25 | v2 |
| 2026-03-09 | F | 49 | - | v1 |
preserveMetadata parameter description is vague: 'The metadata to preserve in the image file'. It does not explain that this is optional, that it only accepts the enum values ['copyright', 'creation', 'location'], or what the default behavior is if omitted (e.g., all metadata stripped).
API credential injection is not documented. The code reads tinify.key = config.apiKey from environment config, but tool descriptions do not mention this dependency or what happens if the key is missing. Users/agents will be confused.
Inconsistent behavior in compress_local_image: the code auto-appends '_compressed' to output filenames even when outputPath is explicitly provided. The parameter description does not warn that the provided outputPath may be modified.
No idempotency guidance. If an LLM retries compress_local_image with the same inputs, will it overwrite the existing compressed file or fail? Tool description should clarify: 'Overwrites if file exists' or 'Fails if file exists'.