Skip to main content
Glama
LeetCode MCP Server

LeetCode MCP Server

get_user_profile

Retrieve any LeetCode user's public profile by username to view ranking, bio, avatar, submission stats, and platform progress without authentication.

Instructions

Retrieves any user's public profile by username (read-only, no auth). Returns ranking, avatar, bio, submission stats, and platform-specific progress. Use this to look up other users or public stats. Use get_user_status (requires auth) instead to verify the current session user's login state—not for looking up arbitrary users.

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_user_profile"
  }
}

Input Schema

NameRequiredDescriptionDefault
usernameYesLeetCode username (case-sensitive). Public profile lookup; no authentication required.

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 supplied, the description carries the full burden and does well: it declares read-only behavior, states no authentication is required, and enumerates the returned data (ranking, avatar, bio, submission stats, platform-specific progress). It omits failure behavior for nonexistent or private usernames and any rate-limit expectations, 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.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core action and scope, then return contents, then the sibling routing rule. Efficient overall, though the final clause restates the no-arbitrary-lookup point already implied by the opening sentence.

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 one-parameter read-only lookup with no output schema, the description supplies everything needed: input identity, auth posture, and a summary of returned fields. An agent can call this correctly without further context.

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 a single parameter with 100% schema description coverage, and the schema already documents case-sensitivity and the pattern. The description only restates 'by username' and the no-auth lookup context, adding little beyond what the structured field provides, 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 and resource ('Retrieves any user's public profile by username') and immediately scopes it as read-only and auth-free. It explicitly distinguishes itself from the named sibling get_user_status, so an agent can route 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 positive guidance ('Use this to look up other users or public stats') and an explicit exclusion with the alternative named: use get_user_status for the current session user's login state, 'not for looking up arbitrary users'. Both when-to-use and when-not-to-use are present.

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