A Next.js web application with image analysis capabilities using OpenCV
This server has a single tool 'analyze-image' with critical definition gaps. The tool name lacks a clear action verb (should be 'analyze_image' or 'get_image_analysis'). The description is present but minimal (89 chars, below the 194-char baseline). The input schema is visible and typed, but lacks parameter descriptions, the 'imageUrl' parameter has no guidance on format, constraints, or error cases. No output schema is documented; the response structure is inferred from code only. The tool performs a read-only operation but lacks error recovery guidance. The implementation uses shell execution with user input, creating injection risks that should be mitigated in the tool definition via input validation hints.
Analyzes an image from a URL and returns image properties including width, height, grayscale status, and edge count
Parameter 'imageUrl' has no description. LLMs cannot infer format constraints (must be valid HTTP/HTTPS URL, max length, timeout behavior). This invites malformed input and wasted calls.
No output schema documented. Response structure (width, height, isGrayscale, edgeCount) is inferred from code only. LLMs cannot plan downstream operations or validate results without explicit schema.
Error handling is generic ('Image analysis failed'). No guidance on root causes (invalid URL, network timeout, unsupported image format, Python script crash). LLM cannot self-correct or suggest recovery steps.
Tool name 'analyze-image' uses hyphen instead of underscore. MCP convention is snake_case (analyze_image). Inconsistent naming may confuse LLM tool selection.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | F | 23 | 2026-07-28+ | v2 |
Shell execution via exec() with user-supplied imageUrl is a command injection vector. Tool definition should document URL validation constraints (must match https?:// pattern, no shell metacharacters) to guide safe input.