MCP Server for Short URL service integration with AI assistants
Single tool with acceptable schema but weak naming and minimal description. Tool name 'shorten_url' uses verb_noun convention but lacks clarity about the resource being modified. Description is 105 characters, within the 10-1024 range, but lacks guidance on when/why to use the tool and what happens on error. Parameter 'url' is properly typed and has a description (68 chars) meeting the baseline. No output schema documented, LLM cannot introspect the response structure (short code, full URL). Error handling returns isError flag and text responses, but lacks actionable recovery guidance. No tool annotations (readOnlyHint/destructiveHint/idempotentHint) present. Single tool limits composition assessment.
将长链接转换为短链接。当用户想要缩短 URL 时使用此工具。
No output schema documented. LLM cannot predict response structure (fields like 'code', 'url', 'short_url'). Breaks pattern:tool-chain if downstream tools need output fields.
Tool description (105 chars) lacks WHEN/WHY guidance and does not document side effects (irreversible URL shortening). LLMs cannot assess whether this is safe to retry.
Error responses lack recovery guidance. Returns 'Error: <message>' but does not tell LLM whether to retry, ask user, or abort. No error classification (retryable vs fatal).
No input validation documented. Parameter 'url' description states 'must start with http:// or https://' but code does not validate this, client-side validation only. Validation must occur server-side to prevent injection.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | D | 56 | 2026-07-28+ | v2 |
| 2026-03-09 | F | 37 | - | v1 |
API_KEY exposed as environment variable. If deployed as a service, environment variables can leak into logs or error traces. Should use server-side secret injection with no exposure in tool params (already correct here, but doc is missing).
No tool annotations. Tool performs a write operation (creates short URL) but lacks destructiveHint or idempotentHint annotation to signal to LLM that repeated calls may have side effects.