Skip to main content
Glama
LeetCode MCP Server

LeetCode MCP Server

get_recent_submissions

Fetch a LeetCode user's recent submission history, including accepted and failed results, for public Global profiles.

Instructions

Retrieves a user's recent submission history on LeetCode Global (read-only, no auth). Includes both accepted and failed submissions. Global only—not available on CN. Use get_recent_ac_submissions for accepted-only results, or get_all_submissions (auth, current user) for paginated full history with filters.

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": {
      "username": "<username>"
    },
    "name": "get_recent_submissions"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMax submissions to return (default: 10). Increase for more history within the recent window.
usernameYesLeetCode username whose public recent submissions to fetch

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.5.0
  2. Removedv1.4.0
  3. First observed

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it declares read-only, no auth, acceptance-status coverage, and the Global-only limitation (not available on CN). It does not describe the return shape or the meaning of the 'recent window' boundary, so it falls short of fully explicit but is well above adequate.

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 tight sentences: capability + scope first, then routing to alternatives. No filler, nothing repeated from the schema, and the most decision-relevant constraint (Global only) is front-loaded with the rest.

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 two-parameter read tool with no output schema, the description covers safety, availability, and sibling routing adequately. It leaves the returned submission fields and the boundary of the 'recent window' unspecified, but nothing critical to correct invocation is missing.

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 both parameters (username, limit) are already documented with defaults and intent in the schema. The description adds no syntax, range, or format detail beyond that, so the baseline 3 applies.

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 (Retrieves) and resource (a user's recent submission history) with explicit scope: LeetCode Global, read-only, no auth. It also clarifies it includes both accepted and failed submissions, which distinguishes it from the accepted-only sibling without opening any 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?

Explicitly names two alternatives and the condition that selects each: get_recent_ac_submissions for accepted-only, get_all_submissions for paginated full history with filters (auth, current user). This is textbook when-to-use guidance.

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