MCP server for searching and retrieving photos from Unsplash API
Single tool with adequate naming and schema, but description lacks LLM-optimization guidance. Parameter descriptions are present but generic. No error handling guidance, no output schema documentation, and no security considerations for API key injection. Tool follows basic structure but misses production-grade patterns for agent reasoning.
Search for Unsplash photos Args: query: Search keyword page: Page number (1-based) per_page: Results per page (1-30) order_by: Sort method (relevant or latest) color: Color filter (black_and_white, black, white, yellow, orange, red, purple, magenta, green, teal, blue) orientation: Orientation filter (landscape, portrait, squarish) Returns: List[UnsplashPhoto]: List of search results containing photo objects with the following properties: - id: Unique identifier for the photo - description: Optional text description of the photo - urls: Dictionary of available image URLs in different sizes - width: Original image width in pixels - height: Original image height in pixels
Output schema not documented. Tool description states return type is List[UnsplashPhoto] with field details, but no structured schema is visible in tool registration. LLMs cannot reliably extract fields from dataclass definitions.
Tool description lacks WHEN/WHY guidance. Current description is purely functional (what params exist) but does not explain when to use this tool vs alternatives, prerequisites, or rate-limit warnings. LLMs need 50-200 char descriptions optimized for selection.
No error handling guidance. Code catches HTTPStatusError and generic exceptions but returns raw error text. LLMs receive no actionable recovery hints (e.g., 'Invalid API key' → 'Check UNSPLASH_ACCESS_KEY env var').
API key exposed via environment variable without server-side injection pattern. While not a parameter, the code reads UNSPLASH_ACCESS_KEY directly in the tool function. Best practice: inject at server initialization, not per-tool.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | D | 52 | 2026-07-28+ | v2 |
No result limit enforcement or pagination guidance. Tool accepts per_page up to 30 but does not document max results per call or advise agents on pagination strategy for large result sets.