Skip to main content
Glama

list_problem_solutions

Find community solution articles for a LeetCode problem by slug, with optional filters and pagination; returns metadata topicIds to retrieve full content via get_problem_solution.

Instructions

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.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "questionSlug": "<questionSlug>"
    },
    "name": "list_problem_solutions"
  }
}

Input Schema

NameRequiredDescriptionDefault
skipNoSolutions to skip for pagination (default: 0)
limitNoMax solutions per page (default: 10)
orderByNoSort order: 'HOT' (default), 'MOST_VOTES', or 'MOST_RECENT'HOT
tagSlugsNoFilter by language or algorithm tags, e.g. ['python', 'dynamic-programming']
userInputNoKeyword filter on solution title, content, or author (case-insensitive)
questionSlugYesProblem URL slug (e.g., 'two-sum')—same as in /problems/{slug}

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.5.1

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations supplied, the description carries the safety profile itself and does so well: 'read-only, no auth' and 'Returns metadata only (topicId)—not full content'. It doesn't mention rate limits, invalid-slug behavior, or whether an empty result is possible, which keeps it short of a 5.

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?

Four short sentences, zero preamble: purpose, return shape, next step, exclusion rule, in that order. Every sentence carries a distinct decision-relevant fact.

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

Completeness5/5

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

For a read-only list tool with no output schema, the definition supplies what is otherwise missing: the shape of the return value (topicId metadata only) and the exact call to make next. An agent can select and chain this tool correctly from the description alone.

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 questionSlug, skip, limit, orderBy, tagSlugs and userInput are all documented in the schema already. The description adds nothing about pagination, sorting, or filtering semantics; its only extra meaning is about the returned topicId, which is output rather than parameter information.

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?

States a specific verb and resource ('Lists community solution articles for a problem') plus a concrete scope boundary: metadata only, topicId rather than full content. This cleanly separates it from get_problem_solution, whose input is exactly the topicId this tool returns.

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

Usage Guidelines5/5

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

Names the follow-up tool explicitly ('Use get_problem_solution with the returned topicId') and adds a negative rule ('Do not call this when you already have a topicId and need the solution text'). Both the when and the when-not are stated, not inferred.

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