Skip to main content
Glama

get_problem

Get LeetCode CN problem details by number, title, slug, or URL. Choose a language for code templates and optionally include hints; no login required.

Instructions

根据中国站题号、中文/英文标题、titleSlug 或题目 URL 获取题目信息。题目查询不需要登录。language 可指定 python3、cpp、java、typescript 等代码模板。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
languageNo
include_hintsNo
Behavior3/5

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

With no annotations, the description carries the full burden. It adds useful behavioral context: no login required, multiple query identifier types accepted, and language selects a code template. It does not disclose what happens with include_hints, output shape, or failure behavior, leaving notable transparency 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?

Two compact sentences with no filler. The primary behavior and query formats are front-loaded, and the login note is a single efficient clause. Every sentence adds value.

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?

The tool has 3 parameters, no output schema, and no annotations. The description covers query and language semantics, but include_hints is left undefined and the return value is not characterized. For a simple read tool this is adequate but not fully complete.

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?

Since schema description coverage is 0%, the description must compensate. It gives meaningful meaning for query (possible identifier formats) and language (python3, cpp, java, typescript code templates), but it does not explain the include_hints parameter at all, and the language list is only illustrative.

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 a specific verb and resource: retrieving problem information by Chinese site problem number, title, titleSlug, or URL. It does not explicitly differentiate itself from sibling tools, but the resource scope (problems vs. auth/submissions) is unambiguous.

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

Usage Guidelines3/5

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

The description implies when to use the tool (whenever problem info is needed) and provides the helpful note that login is not required. However, it does not mention when not to use it, nor does it compare against the sibling tools such as get_submissions_by_date.

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/lkastar/leetcode-mcp'

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