Skip to main content
Glama
SPerekrestova

Interactive LeetCode MCP

list_problem_solutions

Retrieve community solution metadata for a LeetCode problem, including topic IDs. Requires reaching maximum hint level first.

Instructions

Retrieves community solution metadata (topicIds) for a problem. GATED: rejects with HINT_LEVEL_TOO_LOW unless the active session for the slug has reached the maximum hint level. Drive the user through request_hint until that level is reached.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
skipNoNumber of solutions to skip before collecting results. Used with `limit` for pagination.
limitNoMaximum number of solutions to return per request. Default 10. Must be a positive integer.
orderByNoSorting criteria. 'HOT' is LeetCode's default (recency × popularity), 'MOST_VOTES' = upvotes, 'MOST_RECENT' = newest.HOT
tagSlugsNoTag slugs to filter by (languages or algorithm tags). Solutions must match at least one tag.
userInputNoSearch term to filter solutions by title, content, or author name. Case-insensitive.
questionSlugYesThe URL slug of the problem (e.g., 'two-sum').
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, description carries full burden. It discloses the critical gating behavior (rejects with HINT_LEVEL_TOO_LOW) and the return type (topicIds). Does not mention pagination behavior beyond schema fields, but schema provides skip/limit details.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences: first states purpose, second states critical gating condition. No fluff, front-loaded with key information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Describes return type (topicIds) and gating condition. With 6 parameters fully described in schema and no output schema, the description provides adequate context. Could mention that solutions are community solutions, but that is implicit.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so baseline is 3. The description adds no extra meaning to parameters beyond what the schema already provides. The gating condition is relevant context but not parameter-specific.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it retrieves community solution metadata (topicIds) for a problem, which is a specific verb+resource. However, it does not explicitly differentiate from sibling tool 'get_problem_solution', though the name implies listing.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states the gating condition (requires maximum hint level) and instructs to drive the user through request_hint first. This provides clear when-to-use guidance, but no explicit mention of alternatives for cases when not gated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/SPerekrestova/interactive-leetcode-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server