Skip to main content
Glama
SPerekrestova

Interactive LeetCode MCP

get_problem_solution

Retrieve the full content of a community solution for a LeetCode problem using the solution's topic ID and problem slug. Requires reaching the maximum hint level.

Instructions

Retrieves the full content of a specific community solution. GATED: rejects with HINT_LEVEL_TOO_LOW unless the session for titleSlug has reached the maximum hint level. Pass the topicId returned by list_problem_solutions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
topicIdYesThe unique topic ID of the solution, returned by list_problem_solutions.
titleSlugYesThe URL slug of the problem the solution belongs to. Required to verify the session has reached the unlock level.
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It reveals the gating behavior (rejects if hint level not max) and dependency on 'list_problem_solutions'. However, it does not describe side effects, rate limits, or the format of the returned content, leaving some behavioral gaps.

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?

The description is only two sentences, front-loaded with the primary purpose, followed by crucial gating and dependency information. No extraneous content.

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

Completeness3/5

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

Given the lack of output schema, the description does not explain the return format (e.g., whether full content includes code, explanations, or metadata). This leaves ambiguity. It does tie well to the sibling tool 'list_problem_solutions', but completeness is hindered by the missing return specification.

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 coverage is 100% and both parameters have detailed descriptions. The tool's description merely repeats the schema information (e.g., topicId from list_problem_solutions). It adds little new meaning beyond what the schema already provides.

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

Purpose5/5

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

The description clearly states 'Retrieves the full content of a specific community solution.' This uses a specific verb (retrieves) and resource (community solution), and it distinguishes the tool from the sibling 'list_problem_solutions' which lists solutions rather than retrieving a single one.

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?

The description provides explicit context: the tool is gated requiring maximum hint level, and instructs to pass the topicId from 'list_problem_solutions'. It does not explicitly state when not to use it, but the gating implies when it's applicable.

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