Skip to main content
Glama

similar_questions

Returns 3-5 similar LeetCode problems that reinforce the same DSA pattern, helping you practice related concepts after reviewing a given problem statement.

Instructions

Given a LeetCode problem, returns 3-5 similar problems that reinforce the same DSA pattern.

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": {
      "problem": "<problem>"
    },
    "name": "similar_questions"
  }
}

Input Schema

NameRequiredDescriptionDefault
problemYesThe full LeetCode problem statement

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.5/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden. It correctly signals a non-mutating lookup and quantifies the result count (3-5), but says nothing about latency, whether an empty result is possible for an obscure problem, or what identifying information each similar problem carries.

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?

A single sentence that leads with the input and states the output and its size range. Nothing is wasted and nothing is buried.

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?

With no output schema, the description should describe the return shape, yet it only gives a count range. An agent cannot tell whether it receives titles, slugs, links, or difficulty levels, which matters for deciding how to chain this into a follow-up call.

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?

There is one parameter with 100% schema description coverage, so the schema already documents that a full problem statement is expected. The description adds no further guidance on input shaping, such as whether a truncated statement or a problem title alone would work.

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 pairs a specific verb ("returns") with a specific resource ("3-5 similar problems") and a selection criterion ("reinforce the same DSA pattern"). That distinguishes it in practice from get_approach, get_complexity, and get_hint, though it never names a sibling explicitly.

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?

Usage is implied rather than stated: an agent can infer this is the tool for finding practice problems on the same pattern, but there is no explicit when-to-use, when-not-to-use, or comparison to alternatives like upsolve. The intent is clear enough that a competent agent would not be misled.

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