MCP server for accessing LeetCode problem descriptions, solutions, and related information
LeetCodeMCP has 5 tools with basic verb-noun naming (get_*, find_*), but critical gaps undermine quality. All tools have descriptions (10-60 chars), but most are too brief to guide LLM selection effectively. Input schemas are present with type and description for parameters, but output schemas are completely undocumented, LLMs cannot plan downstream calls or extract structured data. No error handling guidance, no parameter constraints (enums, ranges), and no indication of what fields are returned. The code snippet shows a typo ('conten' instead of 'content') in the solution retrieval path, indicating incomplete testing. Tool descriptions lack context on when to use each variant (by_problem_id vs by_problem_file) and what data structures are returned.
Find problem slug by LeetCode problem ID
Find problem description (markdown content) from problem file
Get problem description by problem ID
Get problem solution and explanation by problem file
Get problem solution and explanation by problem ID
No output schemas documented. LLMs cannot infer what fields are returned (string? object? array?), forcing them to guess and breaking downstream tool composition.
Descriptions too brief (30-60 chars). Do not explain WHEN to use each tool variant or what distinguishes by_problem_id from by_problem_file. LLMs cannot select the right tool.
No error handling guidance. Code catches exceptions silently and returns generic strings ('No description found', 'No slug found', 'No solution article found'). LLMs cannot distinguish between 'not found' and 'API error' or know whether to retry.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | F | 44 | <=2025-11-25 | v2 |
Typo in main.py line ~180: 'return conten' should be 'return content'. This breaks the get_leetcode_question_solution_by_problem_id tool entirely.
No parameter constraints. 'problem_id' and 'frontend_problem_id' accept any string; no validation, format hints, or examples. LLMs may pass invalid IDs without guidance on valid formats.