Model Context Protocol (MCP) server for creating and managing Dub.co short links
The server defines 3 tools with explicit schemas and descriptions present in the ListToolsRequest handler. Naming follows the verb_noun pattern (create_link, update_link, delete_link) which is appropriate. However, descriptions are minimal (under 15 words each), parameter descriptions are sparse, and output schemas are completely undocumented. The tools accept only string parameters with minimal guidance on format/constraints. Error handling returns raw HTTP status and attempts to parse Dub.co error responses, but provides no recovery guidance to the agent. No parameter validation is performed at the tool implementation level (lines 240-290 in error handling catch block). The server does not declare destructive operation impacts clearly in descriptions despite delete_link being marked as DESTRUCTIVE.
Create a new short link on dub.co, asking the user which domain to use
Delete a short link on dub.co
Update an existing short link on dub.co
Output schemas completely undocumented. Tools return structured objects but LLMs cannot know what fields to expect. create_link returns a Link object with id, domain, key, url, shortLink, none of these are described in tool response documentation.
Destructive tool (delete_link) lacks clear warning in description. Description is only 5 words ('Delete a short link on dub.co') and does not explain consequences or recommend confirmation workflows. Per pattern:confirmation-request, irreversible operations should support dry-run or explicit confirmation.
Parameter descriptions are minimal or absent. 'url' param in create_link says 'The destination URL to shorten' but does not specify format (http/https required?), length limits, or validation rules. 'domain' param says 'Optional domain slug to use' but does not explain what a valid slug looks like or how to discover available domains.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | F | 46 | 2026-07-28+ | v2 |
| 2026-03-09 | F | 36 | - | v1 |
No enumeration constraints on parameters. 'domain' is a free-form string with no validation. An agent might pass 'invalid-domain' and receive a 400 error with no guidance on available domains. Per pattern:constrained-input, parameters accepting one of a known set of values should declare an enum.
Error responses lack recovery guidance. When Dub.co returns a 400 or 401, the tool extracts the error message and returns it as plain text (lines 254-265). The LLM receives 'Error: 400 - Invalid domain' but has no guidance on next steps: Should it try a different domain? Call a discovery tool? This violates pattern:recovery-guide.
No tool discovery mechanism. An agent cannot list available domains before calling create_link. The 'domain' parameter says 'Optional domain slug to use. If not provided, the primary domain will be used' but does not tell the agent how to discover the primary domain or list alternatives. Per pattern:tool-chain, related tool outputs must chain together.
No input validation in tool handlers. The createLink method (lines 170-195) accepts user input directly and passes it to axios without sanitizing or validating. No check for malformed URLs, excessively long slugs, or invalid domain references. Per pattern:tool-gateway, agent input must be validated before use.
API credentials exposed in code. DUBCO_API_KEY is read from environment (line 8) but used as plaintext Bearer token in every request (line 100). While this is the standard pattern, the code lacks rotation guidance, expiry handling, or recovery if the key is compromised. Not a critical flaw but worthy of note.