Skip to main content
Glama

search_problems

Find LeetCode problems by category, tags, difficulty, or keywords, then return a JSON list of matches with limit/offset pagination.

Instructions

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tagsNoTopic tags to filter by, e.g. ['array', 'dynamic-programming']. Omit for no tag filter.
limitNoMax results per page (default: 10)
offsetNoResults to skip for pagination (default: 0)
categoryNoProblem set category (e.g., 'algorithms', 'database'). Default: 'all-code-essentials'.all-code-essentials
difficultyNoDifficulty filter. Omit for all levels.
searchKeywordsNoKeyword search in problem titles and descriptions

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.4.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden and does well: it discloses read-only semantics, that no auth is required, that pagination is via limit/offset, and that results come back as JSON. It stops short of stating rate limits, a maximum page size, or total-result behavior, which would matter for a browse tool.

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?

Three short sentences, zero filler. Capabilities come first, then pagination/return, then the routing guidance, so the most decision-relevant information is front-loaded.

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?

For a six-parameter, no-output-schema, no-annotation tool, the description covers purpose, safety, auth, pagination, and return type, which is enough to invoke correctly. It could say a bit more about the shape of each result item, but the essential contract is present.

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 every parameter is already documented in the schema, and the description adds little beyond echoing that limit/offset drive pagination. Baseline 3 is appropriate when the schema does the heavy lifting.

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 ('Searches LeetCode problems') plus the exact filter dimensions it operates on. It also explicitly distinguishes itself from the sibling get_problem, so an agent can route between the two without opening either schema.

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?

Gives an explicit when-to-use rule: 'Use get_problem when you already know the titleSlug; use this to browse or discover problems.' This names the alternative sibling and the condition that selects one over the other, leaving nothing to inference.

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