Skip to main content
Glama

post_solution

Generates a structured LeetCode discussion post from your accepted solution, covering approach, complexity, estimated beat percentage, and why it outperforms brute force.

Instructions

Takes a user's accepted solution and generates a structured LeetCode discussion post with approach, complexity, estimated beat %, and why it's better than brute force.

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>",
      "solution_code": "<solution_code>"
    },
    "name": "post_solution"
  }
}

Input Schema

NameRequiredDescriptionDefault
problemYesThe full LeetCode problem statement
languageNoProgramming language, e.g. Python, Java (auto-detected if omitted)
solution_codeYesThe user's accepted solution code

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?

With no annotations, the description carries the full burden. It usefully discloses the generated content, but leaves a critical ambiguity unresolved: whether 'post' means publishing to a discussion forum (a side effect) or merely producing text locally. Nothing is said about auth requirements, rate limits, or behavior on non-accepted or non-compiling code.

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, front-loaded with the action and resource, followed by the concrete output components. Every clause carries information and there is no filler or redundancy.

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?

For a three-parameter generation tool with no output schema, the description usefully enumerates what the output contains, which partly substitutes for a missing return schema. However, with no annotations at all, it should clarify the publishing side effect and preconditions to be 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?

Schema description coverage is 100%, so all three parameters are already documented, including the auto-detection behavior for language. The description only reinforces that solution_code must be an accepted solution; it adds no format or syntax detail beyond the schema, so the baseline of 3 applies.

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?

Uses a specific verb ('generates') and a specific artifact ('structured LeetCode discussion post'), then enumerates its contents (approach, complexity, estimated beat %, brute-force comparison). An agent can distinguish this from retrieval-style siblings like get_approach or get_complexity, though the description never explicitly contrasts itself with them.

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: the tool requires 'a user's accepted solution', which signals a prerequisite but not a decision rule. There is no guidance on when to prefer this over get_approach/get_complexity, nor any exclusion such as when the solution is not yet accepted.

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