Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
LEETCODE_SITENoLeetCode API endpoint: `global` (leetcode.com) or `cn` (leetcode.cn).global
LEETCODE_SESSIONNoLeetCode session cookie for authenticated API access.
LEETCODE_HTTP_HOSTNoHTTP server host when using Streamable HTTP.127.0.0.1
LEETCODE_HTTP_PORTNoHTTP server port when using Streamable HTTP.3000
LEETCODE_TRANSPORTNoTransport mode: `stdio` or `http`.stdio
LEETCODE_HTTP_ENDPOINTNoHTTP endpoint path when using Streamable HTTP./mcp

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}
prompts
{
  "listChanged": true
}
resources
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
get_daily_challengeA

Retrieves today's Daily Challenge problem with full description (read-only, no auth). Returns problem details for the current date as JSON. Use get_problem when you know a specific titleSlug; use search_problems to discover problems by filters.

get_problemA

Retrieves a single LeetCode problem by titleSlug (read-only, no auth). Returns description, examples, constraints, and metadata as JSON. Use search_problems to find problems by keyword/tag/difficulty; use get_daily_challenge for today's featured problem.

search_problemsA

Searches LeetCode problems by category, tags, difficulty, and keywords (read-only, no auth). Supports pagination via limit/offset. Returns matching problem list as JSON. Use get_problem when you already know the titleSlug; use this to browse or discover problems.

get_code_snippetA

Retrieves starter boilerplate code for a problem in a specified programming language (read-only, no auth). Returns snippet, language, and method signatures as JSON. Use this when writing a solution and needing the exact starter template without fetching the full problem description.

get_random_problemA

Picks a random LeetCode problem optionally filtered by difficulty, category, and topic tags (read-only, no auth). Returns randomly selected problem details as JSON. Useful for mock interview preparation or algorithmic practice.

get_user_profileA

Retrieves any user's public profile by username (read-only, no auth). Returns ranking, avatar, bio, submission stats, and platform-specific progress. Use this to look up other users or public stats. Use get_user_status (requires auth) instead to verify the current session user's login state—not for looking up arbitrary users.

get_recent_submissionsA

Retrieves a user's recent submission history on LeetCode Global (read-only, no auth). Includes both accepted and failed submissions. Global only—not available on CN. Use get_recent_ac_submissions for accepted-only results, or get_all_submissions (auth, current user) for paginated full history with filters.

get_recent_ac_submissionsA

Retrieves a user's recent accepted (AC) submissions (read-only, no auth). Available on both Global and CN. Use get_recent_submissions (Global only) to include failed attempts, or get_all_submissions (auth, current user) for full paginated history.

get_user_contest_rankingA

Retrieves a user's contest ranking and participation history (read-only, no auth). Returns overall rating, ranking, and per-contest performance as JSON. Use get_user_profile for general stats and ranking; use this specifically for contest performance data.

get_upcoming_contestsA

Retrieves the schedule of upcoming LeetCode contests (read-only, no auth). Returns titles, slugs, start times (epoch & ISO), durations, and direct registration links as JSON. Use this to check upcoming Weekly or Biweekly contests.

list_problem_solutionsA

Lists community solution articles for a problem (read-only, no auth). Returns metadata only (topicId)—not full content. Use get_problem_solution with the returned topicId to read the full article. Do not call this when you already have a topicId and need the solution text.

get_problem_solutionA

Retrieves full content of a community solution article (read-only, no auth). Requires topicId from list_problem_solutions. Returns article text, author, and metadata as JSON. Use list_problem_solutions first to discover solutions and obtain topicId.

Prompts

Interactive templates invoked by user choice

NameDescription
explain_problemGenerates a structured, intuitive explanation of a LeetCode problem, breaking down constraints, edge cases, and algorithmic patterns.
get_hintProvides progressive, non-spoiler hints for a problem based on the requested hint level.
code_reviewReviews a candidate solution for a LeetCode problem, evaluating correctness, time/space complexity, edge cases, and code style.
mock_interviewInitiates an interactive coding interview where the AI acts as a senior technical interviewer guiding the candidate through the problem.

Resources

Contextual data attached and managed by the client

NameDescription
problem-categoriesA list of all problem classification categories in LeetCode platform, including difficulty levels (Easy, Medium, Hard) and algorithmic domains. These categories help organize and filter coding problems for users based on their complexity and topic area. Returns an array of all available problem categories.
problem-tagsA detailed collection of algorithmic and data structure tags used by LeetCode to categorize problems. These tags represent specific algorithms (like 'dynamic-programming', 'binary-search') or data structures (such as 'array', 'queue', 'tree') that are relevant to solving each problem. Returns an array of all available problem tags for filtering and searching problems.
problem-langsA complete list of all programming languages officially supported by LeetCode for code submission and problem solving. Returns an array of all available programming languages on the platform.

TDQS

A4.1/5.0

Scored across 12 tools

Disambiguation4/5

Most tools target a distinct resource+mode (problem fetch, search, random, daily challenge, solutions list vs. read, contest schedule vs. ranking, profile, submissions), and descriptions actively cross-reference siblings to steer selection. The only soft overlaps are get_recent_submissions vs. get_recent_ac_submissions and get_problem vs. get_random_problem/get_daily_challenge, but the descriptions spell out the boundaries. Minor deduction because descriptions reference tools not present in the set (get_user_status, get_all_submissions), which can muddy an agent's mental model.

Naming Consistency5/5

All 12 names are snake_case with a predictable verb_noun pattern using a small verb vocabulary (get_, list_, search_). Variants are distinguished by clear, consistent suffixes (get_recent_submissions vs. get_recent_ac_submissions). No mixed conventions anywhere.

Tool Count5/5

Twelve tools sit squarely in the well-scoped range, and each covers a discrete capability (problem retrieval, discovery, solutions, code snippets, contests, user stats, submissions). Nothing appears redundant enough to remove, and the surface is not bloated.

Completeness4/5

The read-only surface covers the core LeetCode workflows well: problem discovery/retrieval, solutions, starter code, contests, profiles, and submission history. Gaps are mostly ones the descriptions themselves advertise but do not deliver (get_user_status, paginated get_all_submissions with filters), plus no official editorial or CN-specific variants. These are workable but leave dead references in the descriptions.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues