{
  "answers": {
    "c00": {
      "noul": 0.99,
      "type": "noul"
    },
    "c01": {
      "noul": 0.99,
      "type": "noul"
    },
    "c02": {
      "noul": 0.99,
      "type": "noul"
    },
    "c03": {
      "noul": 0.99,
      "type": "noul"
    },
    "c04": {
      "noul": 0.99,
      "type": "noul"
    },
    "c05": {
      "noul": 0.99,
      "type": "noul"
    },
    "c06": {
      "noul": 0.99,
      "type": "noul"
    },
    "c07": {
      "noul": 0.99,
      "type": "noul"
    },
    "c08": {
      "noul": 0.99,
      "type": "noul"
    },
    "c09": {
      "noul": 0.99,
      "type": "noul"
    },
    "c10": {
      "noul": 0.99,
      "type": "noul"
    },
    "c11": {
      "noul": 0.99,
      "type": "noul"
    },
    "c12": {
      "noul": 0.99,
      "type": "noul"
    },
    "c13": {
      "noul": 0.93,
      "type": "noul"
    },
    "w00": {
      "noul": 0.97,
      "type": "noul"
    },
    "w01": {
      "noul": 0.95,
      "type": "noul"
    },
    "w02": {
      "noul": 0.97,
      "type": "noul"
    },
    "w03": {
      "noul": 0.01,
      "type": "noul"
    },
    "w04": {
      "noul": 0.02,
      "type": "noul"
    },
    "w05": {
      "noul": 0.01,
      "type": "noul"
    },
    "w06": {
      "noul": 0.01,
      "type": "noul"
    },
    "w07": {
      "noul": 0.01,
      "type": "noul"
    },
    "w08": {
      "noul": 0.02,
      "type": "noul"
    }
  },
  "asked_at": "2026-11-23T02:19:07Z",
  "endpoint": "https://api.typesafe.ai/v1/systemone",
  "errors_helpful": [
    {
      "call": 0,
      "noul": 0.99,
      "question": "c00"
    },
    {
      "call": 1,
      "noul": 0.99,
      "question": "c01"
    },
    {
      "call": 2,
      "noul": 0.99,
      "question": "c02"
    },
    {
      "call": 3,
      "noul": 0.99,
      "question": "c03"
    },
    {
      "call": 4,
      "noul": 0.99,
      "question": "c04"
    },
    {
      "call": 5,
      "noul": 0.99,
      "question": "c05"
    },
    {
      "call": 6,
      "noul": 0.99,
      "question": "c06"
    },
    {
      "call": 7,
      "noul": 0.99,
      "question": "c07"
    },
    {
      "call": 8,
      "noul": 0.99,
      "question": "c08"
    },
    {
      "call": 9,
      "noul": 0.99,
      "question": "c09"
    },
    {
      "call": 10,
      "noul": 0.99,
      "question": "c10"
    },
    {
      "call": 11,
      "noul": 0.99,
      "question": "c11"
    },
    {
      "call": 12,
      "noul": 0.99,
      "question": "c12"
    },
    {
      "call": 13,
      "noul": 0.93,
      "question": "c13"
    }
  ],
  "format": "didrun.judgments.v1",
  "input_tokens": 16668,
  "method": "0.15.0",
  "model": "jev-1.14.0",
  "model_asked": "jev-1.14.0",
  "request": {
    "model": "jev-1.14.0",
    "questions": {
      "c00": {
        "criteria": {
          "false": "The reply names no argument of the tool: for example a generic failure, a stack trace with no argument named, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply names at least one argument of the tool that the call left out or got wrong, and so tells the caller what to change."
        },
        "instructions": {
          "arguments_sent": {},
          "question": "Does `reply` name an argument that the call must add or fix?",
          "reply": "MCP error -32602: Input validation error: Invalid arguments for tool get_problem: Required at titleSlug",
          "tool": "get_problem"
        },
        "type": "noul"
      },
      "c01": {
        "criteria": {
          "false": "The reply does not point to `parameter`: for example a generic failure, an error about another argument, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply points to `parameter` or to its value and says the value has the wrong type or is not accepted."
        },
        "instructions": {
          "arguments_sent": {
            "titleSlug": {}
          },
          "parameter": "titleSlug",
          "question": "Does `reply` tell the caller that `parameter` has a value the tool does not accept?",
          "reply": "MCP error -32602: Input validation error: Invalid arguments for tool get_problem: Expected string, received object at titleSlug",
          "tool": "get_problem"
        },
        "type": "noul"
      },
      "c02": {
        "criteria": {
          "false": "The reply names no argument of the tool: for example a generic failure, a stack trace with no argument named, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply names at least one argument of the tool that the call left out or got wrong, and so tells the caller what to change."
        },
        "instructions": {
          "arguments_sent": {},
          "question": "Does `reply` name an argument that the call must add or fix?",
          "reply": "MCP error -32602: Input validation error: Invalid arguments for tool get_user_profile: Required at username",
          "tool": "get_user_profile"
        },
        "type": "noul"
      },
      "c03": {
        "criteria": {
          "false": "The reply does not point to `parameter`: for example a generic failure, an error about another argument, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply points to `parameter` or to its value and says the value has the wrong type or is not accepted."
        },
        "instructions": {
          "arguments_sent": {
            "username": {}
          },
          "parameter": "username",
          "question": "Does `reply` tell the caller that `parameter` has a value the tool does not accept?",
          "reply": "MCP error -32602: Input validation error: Invalid arguments for tool get_user_profile: Expected string, received object at username",
          "tool": "get_user_profile"
        },
        "type": "noul"
      },
      "c04": {
        "criteria": {
          "false": "The reply does not point to `parameter`: for example a generic failure, an error about another argument, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply points to `parameter` or to its value and says the value has the wrong type or is not accepted."
        },
        "instructions": {
          "arguments_sent": {
            "difficulty": "not an array"
          },
          "parameter": "difficulty",
          "question": "Does `reply` tell the caller that `parameter` has a value the tool does not accept?",
          "reply": "MCP error -32602: Input validation error: Invalid arguments for tool get_problem_progress: Expected array, received string at difficulty",
          "tool": "get_problem_progress"
        },
        "type": "noul"
      },
      "c05": {
        "criteria": {
          "false": "The reply names no argument of the tool: for example a generic failure, a stack trace with no argument named, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply names at least one argument of the tool that the call left out or got wrong, and so tells the caller what to change."
        },
        "instructions": {
          "arguments_sent": {},
          "question": "Does `reply` name an argument that the call must add or fix?",
          "reply": "MCP error -32602: Input validation error: Invalid arguments for tool start_problem: Required at titleSlug",
          "tool": "start_problem"
        },
        "type": "noul"
      },
      "c06": {
        "criteria": {
          "false": "The reply does not point to `parameter`: for example a generic failure, an error about another argument, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply points to `parameter` or to its value and says the value has the wrong type or is not accepted."
        },
        "instructions": {
          "arguments_sent": {
            "titleSlug": {}
          },
          "parameter": "titleSlug",
          "question": "Does `reply` tell the caller that `parameter` has a value the tool does not accept?",
          "reply": "MCP error -32602: Input validation error: Invalid arguments for tool start_problem: Expected string, received object at titleSlug",
          "tool": "start_problem"
        },
        "type": "noul"
      },
      "c07": {
        "criteria": {
          "false": "The reply names no argument of the tool: for example a generic failure, a stack trace with no argument named, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply names at least one argument of the tool that the call left out or got wrong, and so tells the caller what to change."
        },
        "instructions": {
          "arguments_sent": {},
          "question": "Does `reply` name an argument that the call must add or fix?",
          "reply": "MCP error -32602: Input validation error: Invalid arguments for tool get_session_state: Required at titleSlug",
          "tool": "get_session_state"
        },
        "type": "noul"
      },
      "c08": {
        "criteria": {
          "false": "The reply does not point to `parameter`: for example a generic failure, an error about another argument, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply points to `parameter` or to its value and says the value has the wrong type or is not accepted."
        },
        "instructions": {
          "arguments_sent": {
            "titleSlug": {}
          },
          "parameter": "titleSlug",
          "question": "Does `reply` tell the caller that `parameter` has a value the tool does not accept?",
          "reply": "MCP error -32602: Input validation error: Invalid arguments for tool get_session_state: Expected string, received object at titleSlug",
          "tool": "get_session_state"
        },
        "type": "noul"
      },
      "c09": {
        "criteria": {
          "false": "The reply names no argument of the tool: for example a generic failure, a stack trace with no argument named, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply names at least one argument of the tool that the call left out or got wrong, and so tells the caller what to change."
        },
        "instructions": {
          "arguments_sent": {},
          "question": "Does `reply` name an argument that the call must add or fix?",
          "reply": "MCP error -32602: Input validation error: Invalid arguments for tool list_problem_solutions: Required at questionSlug",
          "tool": "list_problem_solutions"
        },
        "type": "noul"
      },
      "c10": {
        "criteria": {
          "false": "The reply does not point to `parameter`: for example a generic failure, an error about another argument, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply points to `parameter` or to its value and says the value has the wrong type or is not accepted."
        },
        "instructions": {
          "arguments_sent": {
            "questionSlug": {}
          },
          "parameter": "questionSlug",
          "question": "Does `reply` tell the caller that `parameter` has a value the tool does not accept?",
          "reply": "MCP error -32602: Input validation error: Invalid arguments for tool list_problem_solutions: Expected string, received object at questionSlug",
          "tool": "list_problem_solutions"
        },
        "type": "noul"
      },
      "c11": {
        "criteria": {
          "false": "The reply names no argument of the tool: for example a generic failure, a stack trace with no argument named, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply names at least one argument of the tool that the call left out or got wrong, and so tells the caller what to change."
        },
        "instructions": {
          "arguments_sent": {},
          "question": "Does `reply` name an argument that the call must add or fix?",
          "reply": "MCP error -32602: Input validation error: Invalid arguments for tool save_leetcode_credentials: Required at csrftoken\nRequired at session",
          "tool": "save_leetcode_credentials"
        },
        "type": "noul"
      },
      "c12": {
        "criteria": {
          "false": "The reply does not point to `parameter`: for example a generic failure, an error about another argument, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply points to `parameter` or to its value and says the value has the wrong type or is not accepted."
        },
        "instructions": {
          "arguments_sent": {
            "csrftoken": {},
            "session": "didrun"
          },
          "parameter": "csrftoken",
          "question": "Does `reply` tell the caller that `parameter` has a value the tool does not accept?",
          "reply": "MCP error -32602: Input validation error: Invalid arguments for tool save_leetcode_credentials: Expected string, received object at csrftoken",
          "tool": "save_leetcode_credentials"
        },
        "type": "noul"
      },
      "c13": {
        "criteria": {
          "false": "The reply does not say the tool is missing: for example a generic failure, a crash, or a normal answer.",
          "true": "The reply says the tool is unknown, not found, or does not exist."
        },
        "instructions": {
          "arguments_sent": {},
          "question": "Does `reply` tell the caller that there is no tool named `tool`?",
          "reply": "MCP error -32602: Tool didrun_unknown_tool not found",
          "tool": "didrun_unknown_tool"
        },
        "type": "noul"
      },
      "w00": {
        "criteria": {
          "false": "The tool replies show an error, a missing or different result, or nothing about the task; or only the agent's final answer claims the task was done.",
          "true": "The tool replies in `steps` show the result that `done_when` describes. The result came from the server's tools, not only from the agent's own words."
        },
        "instructions": {
          "agent_final_answer": "## Server getting-started guide\n\n### Practice session flow\n\n1. Invoke `leetcode_learning_mode` at the start of a practice session.\n2. Pick a problem, either through search or the daily challenge.\n3. Invoke `leetcode_problem_workflow` with the problem slug and difficulty.\n4. Invoke `leetcode_workspace_setup` with the language, problem slug, and code template.\n5. Work through progressive hints before seeing a complete solution.\n6. Submit with `submit_solution` when ready.\n\nThe guide specifies four hint levels: guiding questions, general approaches, specific implementation hints, and pseudocode or partial implementation. It says to show a complete solution only when explicitly requested after the earlier hints.\n\n### Authentication flow\n\nBefore an authentication-sensitive action, check authentication status. If credentials are missing or expired, invoke `leetcode_authentication_guide`, follow its login and credential-saving flow, then retry the action. On a 401 error, check authentication status and follow the same flow.\n\n### Submission language map\n\n| Language | `submit_solution` value |\n|---|---|\n| Python / Python 3 | `python3` |\n| Python 2 | `python` |\n| Java | `java` |\n| C++ | `cpp` |\n| JavaScript | `javascript` |\n| TypeScript | `typescript` |\n\n“Python” without a version defaults to `python3`.\n\n## Local runtime and sandbox check\n\nI ran the server’s runtime diagnostic. It reported:\n\n- **Python 3:** unavailable\n- **Go:** unavailable\n- **Java:** unavailable\n- **Sandbox:** none detected (`kind: none`, `available: false`)",
          "done_when": "The transcript shows replies from the getting-started guide and runtime diagnostic tools.",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {},
              "reply": "# Interactive LeetCode MCP — Usage Guide\n\n## Prompts (must be explicitly invoked — not auto-active)\n\n| Prompt | When to invoke | Params |\n|--------|---------------|--------|\n| leetcode_learning_mode | START of any practice session, before discussing a problem | none |\n| leetcode_problem_workflow | Once the user selects a specific problem | problemSlug, difficulty |\n| leetcode_workspace_setup | After problem selection, before user starts coding | language, problemSlug, codeTemplate |\n| leetcode_authentication_guide | Whenever auth is needed — first use, 401 errors, or expired credentials | none |\n\n## Session Start Flow\n\n1. Invoke leetcode_learning_mode\n2. User picks a problem (daily challenge or search)\n3. Invoke leetcode_problem_workflow (problemSlug, difficulty)\n4. Invoke leetcode_workspace_setup (language, problemSlug, codeTemplate)\n5. Guide user with progressive hints (4 levels)\n6. Submit with submit_solution when ready\n\n## Learning Mode Rules\n\n- Never show a full solution without first working through hint levels 1 → 2 → 3\n- Level 1: Guiding questions (\"What pattern do you see?\")\n- Level 2: General approaches (\"Consider a hash map...\")\n- Level 3: Specific hints (\"Iterate once while tracking seen values...\")\n- Level 4: Pseudocode or partial implementation\n- Only show complete solutions when explicitly requested AFTER earlier hints have been delivered\n- get_problem_solution and list_problem_solutions return full community solutions — only use at Level 4 or on explicit \"show me the solution\" after hints\n\n## Auth Flow\n\n1. Before any auth-sensitive action, call check_auth_status first\n2. If not authenticated or expired → invoke leetcode_authentication_guide prompt (do NOT ad-hoc the instructions)\n3. The prompt guides: start_leetcode_auth → user extracts cookies → save_leetcode_credentials\n4. On success, retry the original action\n5. On any 401 from a tool: call check_auth_status → follow steps 2-4\n\n## Submission Language Map\n\n| User says | Pass this to submit_solution |\n|-----------|------------------------------|\n| Python / Python 3 | python3 |\n| Python 2 | python |\n| Java | java |\n| C++ | cpp |\n| JavaScript | javascript |\n| TypeScript | typescript |\n\nDefault: \"Python\" without version → python3",
              "tool": "get_started"
            },
            {
              "arguments": {},
              "reply": "{\"languages\":[{\"language\":\"python3\",\"available\":false},{\"language\":\"go\",\"available\":false},{\"language\":\"java\",\"available\":false}],\"sandbox\":{\"kind\":\"none\",\"available\":false}}",
              "tool": "runner_doctor"
            }
          ],
          "task": "Show me the server's getting-started guide and check which local language runtimes and sandbox tools are available."
        },
        "type": "noul"
      },
      "w01": {
        "criteria": {
          "false": "The tool replies show an error, a missing or different result, or nothing about the task; or only the agent's final answer claims the task was done.",
          "true": "The tool replies in `steps` show the result that `done_when` describes. The result came from the server's tools, not only from the agent's own words."
        },
        "instructions": {
          "agent_final_answer": "## Server getting-started guide\n\n### Practice session flow\n\nThe server says its prompts must be **explicitly invoked**; they are not automatically active.\n\n1. Invoke `leetcode_learning_mode` at the start of a practice session.\n2. Choose a problem, either from the daily challenge or search.\n3. Invoke `leetcode_problem_workflow` with the problem slug and difficulty.\n4. Invoke `leetcode_workspace_setup` with the language, problem slug, and code template.\n5. Work through progressive hints.\n6. Submit with `submit_solution` when ready.\n\nThe guide describes four hint levels: guiding questions, general approaches, specific implementation hints, and pseudocode or partial implementation. It says to show a complete solution only when explicitly requested after the earlier hints have been delivered.\n\n### Authentication flow\n\nBefore an authentication-sensitive action, call `check_auth_status`. If credentials are missing or expired, invoke `leetcode_authentication_guide`; it covers starting authentication, extracting cookies, and saving credentials. Retry the original action after successful authentication. For a 401 response, check authentication status and follow the same flow.\n\n### Submission language map\n\n| Language | Value for `submit_solution` |\n|---|---|\n| Python 3, or unspecified Python version | `python3` |\n| Python 2 | `python` |\n| Java | `java` |\n| C++ | `cpp` |\n| JavaScript | `javascript` |\n| TypeScript | `typescript` |\n\n## Local runtime and sandbox check\n\nI ran the server’s runtime diagnostic. It reported:\n\n| Runtime | Available |\n|---|---|\n| Python 3 | No |\n| Go | No |\n| Java | No |\n\n**Sandbox:** None detected (`kind: none`, `available: false`). The diagnostic did not report individual availability for `bwrap`, `firejail`, or `sandbox-exec`.",
          "done_when": "The transcript shows replies from the getting-started guide and runtime diagnostic tools.",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {},
              "reply": "# Interactive LeetCode MCP — Usage Guide\n\n## Prompts (must be explicitly invoked — not auto-active)\n\n| Prompt | When to invoke | Params |\n|--------|---------------|--------|\n| leetcode_learning_mode | START of any practice session, before discussing a problem | none |\n| leetcode_problem_workflow | Once the user selects a specific problem | problemSlug, difficulty |\n| leetcode_workspace_setup | After problem selection, before user starts coding | language, problemSlug, codeTemplate |\n| leetcode_authentication_guide | Whenever auth is needed — first use, 401 errors, or expired credentials | none |\n\n## Session Start Flow\n\n1. Invoke leetcode_learning_mode\n2. User picks a problem (daily challenge or search)\n3. Invoke leetcode_problem_workflow (problemSlug, difficulty)\n4. Invoke leetcode_workspace_setup (language, problemSlug, codeTemplate)\n5. Guide user with progressive hints (4 levels)\n6. Submit with submit_solution when ready\n\n## Learning Mode Rules\n\n- Never show a full solution without first working through hint levels 1 → 2 → 3\n- Level 1: Guiding questions (\"What pattern do you see?\")\n- Level 2: General approaches (\"Consider a hash map...\")\n- Level 3: Specific hints (\"Iterate once while tracking seen values...\")\n- Level 4: Pseudocode or partial implementation\n- Only show complete solutions when explicitly requested AFTER earlier hints have been delivered\n- get_problem_solution and list_problem_solutions return full community solutions — only use at Level 4 or on explicit \"show me the solution\" after hints\n\n## Auth Flow\n\n1. Before any auth-sensitive action, call check_auth_status first\n2. If not authenticated or expired → invoke leetcode_authentication_guide prompt (do NOT ad-hoc the instructions)\n3. The prompt guides: start_leetcode_auth → user extracts cookies → save_leetcode_credentials\n4. On success, retry the original action\n5. On any 401 from a tool: call check_auth_status → follow steps 2-4\n\n## Submission Language Map\n\n| User says | Pass this to submit_solution |\n|-----------|------------------------------|\n| Python / Python 3 | python3 |\n| Python 2 | python |\n| Java | java |\n| C++ | cpp |\n| JavaScript | javascript |\n| TypeScript | typescript |\n\nDefault: \"Python\" without version → python3",
              "tool": "get_started"
            },
            {
              "arguments": {},
              "reply": "{\"languages\":[{\"language\":\"python3\",\"available\":false},{\"language\":\"go\",\"available\":false},{\"language\":\"java\",\"available\":false}],\"sandbox\":{\"kind\":\"none\",\"available\":false}}",
              "tool": "runner_doctor"
            }
          ],
          "task": "Show me the server's getting-started guide and check which local language runtimes and sandbox tools are available."
        },
        "type": "noul"
      },
      "w02": {
        "criteria": {
          "false": "The tool replies show an error, a missing or different result, or nothing about the task; or only the agent's final answer claims the task was done.",
          "true": "The tool replies in `steps` show the result that `done_when` describes. The result came from the server's tools, not only from the agent's own words."
        },
        "instructions": {
          "agent_final_answer": "## Server getting-started guide\n\n### Practice session\n\nThe server says its prompts must be **explicitly invoked**; they are not automatically active.\n\n1. Invoke `leetcode_learning_mode` at the start of a practice session.\n2. Choose a problem, then invoke `leetcode_problem_workflow` with its slug and difficulty.\n3. Before coding, invoke `leetcode_workspace_setup` with the language, problem slug, and code template.\n4. Work through progressive hints:\n   - **Level 1:** Guiding questions.\n   - **Level 2:** General approaches.\n   - **Level 3:** Specific implementation hints.\n   - **Level 4:** Pseudocode or partial implementation.\n5. Submit with `submit_solution` when ready.\n\nThe guide says not to show a complete solution until the earlier hint levels have been delivered and the user explicitly requests one. Community solution tools are intended for level 4 or an explicit solution request after hints.\n\n### Authentication\n\nBefore an authentication-sensitive action, check `check_auth_status`. If credentials are missing or expired, invoke `leetcode_authentication_guide`; its flow covers `start_leetcode_auth`, manual cookie extraction, and `save_leetcode_credentials`. On a 401, check status and follow that flow again.\n\n### Submission language map\n\n| User’s language | `submit_solution` value |\n|---|---|\n| Python / Python 3 | `python3` |\n| Python 2 | `python` |\n| Java | `java` |\n| C++ | `cpp` |\n| JavaScript | `javascript` |\n| TypeScript | `typescript` |\n\n### Local runtime and sandbox check\n\nI called the server’s runtime diagnostic. It reported:\n\n- **Python 3:** unavailable\n- **Go:** unavailable\n- **Java:** unavailable\n- **Sandbox:** none available (`kind: none`)\n\nThe diagnostic did not return individual results for each sandbox tool.",
          "done_when": "The transcript shows replies from the getting-started guide and runtime diagnostic tools.",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {},
              "reply": "# Interactive LeetCode MCP — Usage Guide\n\n## Prompts (must be explicitly invoked — not auto-active)\n\n| Prompt | When to invoke | Params |\n|--------|---------------|--------|\n| leetcode_learning_mode | START of any practice session, before discussing a problem | none |\n| leetcode_problem_workflow | Once the user selects a specific problem | problemSlug, difficulty |\n| leetcode_workspace_setup | After problem selection, before user starts coding | language, problemSlug, codeTemplate |\n| leetcode_authentication_guide | Whenever auth is needed — first use, 401 errors, or expired credentials | none |\n\n## Session Start Flow\n\n1. Invoke leetcode_learning_mode\n2. User picks a problem (daily challenge or search)\n3. Invoke leetcode_problem_workflow (problemSlug, difficulty)\n4. Invoke leetcode_workspace_setup (language, problemSlug, codeTemplate)\n5. Guide user with progressive hints (4 levels)\n6. Submit with submit_solution when ready\n\n## Learning Mode Rules\n\n- Never show a full solution without first working through hint levels 1 → 2 → 3\n- Level 1: Guiding questions (\"What pattern do you see?\")\n- Level 2: General approaches (\"Consider a hash map...\")\n- Level 3: Specific hints (\"Iterate once while tracking seen values...\")\n- Level 4: Pseudocode or partial implementation\n- Only show complete solutions when explicitly requested AFTER earlier hints have been delivered\n- get_problem_solution and list_problem_solutions return full community solutions — only use at Level 4 or on explicit \"show me the solution\" after hints\n\n## Auth Flow\n\n1. Before any auth-sensitive action, call check_auth_status first\n2. If not authenticated or expired → invoke leetcode_authentication_guide prompt (do NOT ad-hoc the instructions)\n3. The prompt guides: start_leetcode_auth → user extracts cookies → save_leetcode_credentials\n4. On success, retry the original action\n5. On any 401 from a tool: call check_auth_status → follow steps 2-4\n\n## Submission Language Map\n\n| User says | Pass this to submit_solution |\n|-----------|------------------------------|\n| Python / Python 3 | python3 |\n| Python 2 | python |\n| Java | java |\n| C++ | cpp |\n| JavaScript | javascript |\n| TypeScript | typescript |\n\nDefault: \"Python\" without version → python3",
              "tool": "get_started"
            },
            {
              "arguments": {},
              "reply": "{\"languages\":[{\"language\":\"python3\",\"available\":false},{\"language\":\"go\",\"available\":false},{\"language\":\"java\",\"available\":false}],\"sandbox\":{\"kind\":\"none\",\"available\":false}}",
              "tool": "runner_doctor"
            }
          ],
          "task": "Show me the server's getting-started guide and check which local language runtimes and sandbox tools are available."
        },
        "type": "noul"
      },
      "w03": {
        "criteria": {
          "false": "The tool replies show an error, a missing or different result, or nothing about the task; or only the agent's final answer claims the task was done.",
          "true": "The tool replies in `steps` show the result that `done_when` describes. The result came from the server's tools, not only from the agent's own words."
        },
        "instructions": {
          "agent_final_answer": "I attempted the requested sequence, but the practice session could not be started:\n\n- **Start Two Sum in Python 3:** Failed because the tool could not connect to LeetCode.\n- **Request two hints:** Both requests failed with the same connection error.\n- **Check session state:** No session existed (`null`).\n- **Reset:** Failed because there was no active session.\n- **Check state again:** Still `null`.\n\nThe sandbox has no network access, so I can’t complete the session or retrieve the hints with these tools.",
          "done_when": "The tool replies show the session started, two hints requested, and the hint level reset to zero in the final state.",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {},
              "reply": "# Interactive LeetCode MCP — Usage Guide\n\n## Prompts (must be explicitly invoked — not auto-active)\n\n| Prompt | When to invoke | Params |\n|--------|---------------|--------|\n| leetcode_learning_mode | START of any practice session, before discussing a problem | none |\n| leetcode_problem_workflow | Once the user selects a specific problem | problemSlug, difficulty |\n| leetcode_workspace_setup | After problem selection, before user starts coding | language, problemSlug, codeTemplate |\n| leetcode_authentication_guide | Whenever auth is needed — first use, 401 errors, or expired credentials | none |\n\n## Session Start Flow\n\n1. Invoke leetcode_learning_mode\n2. User picks a problem (daily challenge or search)\n3. Invoke leetcode_problem_workflow (problemSlug, difficulty)\n4. Invoke leetcode_workspace_setup (language, problemSlug, codeTemplate)\n5. Guide user with progressive hints (4 levels)\n6. Submit with submit_solution when ready\n\n## Learning Mode Rules\n\n- Never show a full solution without first working through hint levels 1 → 2 → 3\n- Level 1: Guiding questions (\"What pattern do you see?\")\n- Level 2: General approaches (\"Consider a hash map...\")\n- Level 3: Specific hints (\"Iterate once while tracking seen values...\")\n- Level 4: Pseudocode or partial implementation\n- Only show complete solutions when explicitly requested AFTER earlier hints have been delivered\n- get_problem_solution and list_problem_solutions return full community solutions — only use at Level 4 or on explicit \"show me the solution\" after hints\n\n## Auth Flow\n\n1. Before any auth-sensitive action, call check_auth_status first\n2. If not authenticated or expired → invoke leetcode_authentication_guide prompt (do NOT ad-hoc the instructions)\n3. The prompt guides: start_leetcode_auth → user extracts cookies → save_leetcode_credentials\n4. On success, retry the original action\n5. On any 401 from a tool: call check_auth_status → follow steps 2-4\n\n## Submission Language Map\n\n| User says | Pass this to submit_solution |\n|-----------|------------------------------|\n| Python / Python 3 | python3 |\n| Python 2 | python |\n| Java | java |\n| C++ | cpp |\n| JavaScript | javascript |\n| TypeScript | typescript |\n\nDefault: \"Python\" without version → python3",
              "tool": "get_started"
            },
            {
              "arguments": {
                "language": "python3",
                "titleSlug": "two-sum"
              },
              "reply": "{\"error\":\"Failed to start problem\",\"code\":\"UPSTREAM_ERROR\",\"message\":\"request to https://leetcode.com/graphql failed, reason: Client network socket disconnected before secure TLS connection was established\"}",
              "tool": "start_problem"
            },
            {
              "arguments": {
                "titleSlug": "two-sum"
              },
              "reply": "{\"error\":\"Failed to request hint\",\"code\":\"UPSTREAM_ERROR\",\"message\":\"request to https://leetcode.com/graphql failed, reason: Client network socket disconnected before secure TLS connection was established\"}",
              "tool": "request_hint"
            },
            {
              "arguments": {
                "titleSlug": "two-sum"
              },
              "reply": "{\"error\":\"Failed to request hint\",\"code\":\"UPSTREAM_ERROR\",\"message\":\"request to https://leetcode.com/graphql failed, reason: Client network socket disconnected before secure TLS connection was established\"}",
              "tool": "request_hint"
            },
            {
              "arguments": {
                "titleSlug": "two-sum"
              },
              "reply": "{\"titleSlug\":\"two-sum\",\"session\":null}",
              "tool": "get_session_state"
            },
            {
              "arguments": {
                "titleSlug": "two-sum"
              },
              "reply": "{\"error\":\"Failed to reset session\",\"code\":\"SESSION_NOT_FOUND\",\"message\":\"No active session for \\\"two-sum\\\". Call start_problem first.\"}",
              "tool": "reset_session"
            },
            {
              "arguments": {
                "titleSlug": "two-sum"
              },
              "reply": "{\"titleSlug\":\"two-sum\",\"session\":null}",
              "tool": "get_session_state"
            }
          ],
          "task": "Start a Python 3 practice session for two-sum, request two hints, check the session state, then reset it and check the state again."
        },
        "type": "noul"
      },
      "w04": {
        "criteria": {
          "false": "The tool replies show an error, a missing or different result, or nothing about the task; or only the agent's final answer claims the task was done.",
          "true": "The tool replies in `steps` show the result that `done_when` describes. The result came from the server's tools, not only from the agent's own words."
        },
        "instructions": {
          "agent_final_answer": "I couldn’t start the Python 3 **Two Sum** practice session because the tool couldn’t connect to LeetCode.\n\n- Both hint requests failed with the same connection error.\n- The first state check returned `null`: no session existed.\n- Reset failed with `SESSION_NOT_FOUND`.\n- The final state check also returned `null`.\n\nA network connection to LeetCode is needed to complete the session flow.",
          "done_when": "The tool replies show the session started, two hints requested, and the hint level reset to zero in the final state.",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {},
              "reply": "# Interactive LeetCode MCP — Usage Guide\n\n## Prompts (must be explicitly invoked — not auto-active)\n\n| Prompt | When to invoke | Params |\n|--------|---------------|--------|\n| leetcode_learning_mode | START of any practice session, before discussing a problem | none |\n| leetcode_problem_workflow | Once the user selects a specific problem | problemSlug, difficulty |\n| leetcode_workspace_setup | After problem selection, before user starts coding | language, problemSlug, codeTemplate |\n| leetcode_authentication_guide | Whenever auth is needed — first use, 401 errors, or expired credentials | none |\n\n## Session Start Flow\n\n1. Invoke leetcode_learning_mode\n2. User picks a problem (daily challenge or search)\n3. Invoke leetcode_problem_workflow (problemSlug, difficulty)\n4. Invoke leetcode_workspace_setup (language, problemSlug, codeTemplate)\n5. Guide user with progressive hints (4 levels)\n6. Submit with submit_solution when ready\n\n## Learning Mode Rules\n\n- Never show a full solution without first working through hint levels 1 → 2 → 3\n- Level 1: Guiding questions (\"What pattern do you see?\")\n- Level 2: General approaches (\"Consider a hash map...\")\n- Level 3: Specific hints (\"Iterate once while tracking seen values...\")\n- Level 4: Pseudocode or partial implementation\n- Only show complete solutions when explicitly requested AFTER earlier hints have been delivered\n- get_problem_solution and list_problem_solutions return full community solutions — only use at Level 4 or on explicit \"show me the solution\" after hints\n\n## Auth Flow\n\n1. Before any auth-sensitive action, call check_auth_status first\n2. If not authenticated or expired → invoke leetcode_authentication_guide prompt (do NOT ad-hoc the instructions)\n3. The prompt guides: start_leetcode_auth → user extracts cookies → save_leetcode_credentials\n4. On success, retry the original action\n5. On any 401 from a tool: call check_auth_status → follow steps 2-4\n\n## Submission Language Map\n\n| User says | Pass this to submit_solution |\n|-----------|------------------------------|\n| Python / Python 3 | python3 |\n| Python 2 | python |\n| Java | java |\n| C++ | cpp |\n| JavaScript | javascript |\n| TypeScript | typescript |\n\nDefault: \"Python\" without version → python3",
              "tool": "get_started"
            },
            {
              "arguments": {
                "language": "python3",
                "titleSlug": "two-sum"
              },
              "reply": "{\"error\":\"Failed to start problem\",\"code\":\"UPSTREAM_ERROR\",\"message\":\"request to https://leetcode.com/graphql failed, reason: Client network socket disconnected before secure TLS connection was established\"}",
              "tool": "start_problem"
            },
            {
              "arguments": {
                "titleSlug": "two-sum"
              },
              "reply": "{\"error\":\"Failed to request hint\",\"code\":\"UPSTREAM_ERROR\",\"message\":\"request to https://leetcode.com/graphql failed, reason: Client network socket disconnected before secure TLS connection was established\"}",
              "tool": "request_hint"
            },
            {
              "arguments": {
                "titleSlug": "two-sum"
              },
              "reply": "{\"error\":\"Failed to request hint\",\"code\":\"UPSTREAM_ERROR\",\"message\":\"request to https://leetcode.com/graphql failed, reason: Client network socket disconnected before secure TLS connection was established\"}",
              "tool": "request_hint"
            },
            {
              "arguments": {
                "titleSlug": "two-sum"
              },
              "reply": "{\"titleSlug\":\"two-sum\",\"session\":null}",
              "tool": "get_session_state"
            },
            {
              "arguments": {
                "titleSlug": "two-sum"
              },
              "reply": "{\"error\":\"Failed to reset session\",\"code\":\"SESSION_NOT_FOUND\",\"message\":\"No active session for \\\"two-sum\\\". Call start_problem first.\"}",
              "tool": "reset_session"
            },
            {
              "arguments": {
                "titleSlug": "two-sum"
              },
              "reply": "{\"titleSlug\":\"two-sum\",\"session\":null}",
              "tool": "get_session_state"
            }
          ],
          "task": "Start a Python 3 practice session for two-sum, request two hints, check the session state, then reset it and check the state again."
        },
        "type": "noul"
      },
      "w05": {
        "criteria": {
          "false": "The tool replies show an error, a missing or different result, or nothing about the task; or only the agent's final answer claims the task was done.",
          "true": "The tool replies in `steps` show the result that `done_when` describes. The result came from the server's tools, not only from the agent's own words."
        },
        "instructions": {
          "agent_final_answer": "I attempted the requested sequence, but couldn’t start the Python 3 **two-sum** session because the tool couldn’t connect to LeetCode.\n\n- Both hint requests failed with the same connection error.\n- The first session-state check returned `null`—there was no active session.\n- The reset failed with `SESSION_NOT_FOUND`.\n- The final session-state check also returned `null`.\n\nThe sequence can be retried in an environment with network access.",
          "done_when": "The tool replies show the session started, two hints requested, and the hint level reset to zero in the final state.",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {},
              "reply": "# Interactive LeetCode MCP — Usage Guide\n\n## Prompts (must be explicitly invoked — not auto-active)\n\n| Prompt | When to invoke | Params |\n|--------|---------------|--------|\n| leetcode_learning_mode | START of any practice session, before discussing a problem | none |\n| leetcode_problem_workflow | Once the user selects a specific problem | problemSlug, difficulty |\n| leetcode_workspace_setup | After problem selection, before user starts coding | language, problemSlug, codeTemplate |\n| leetcode_authentication_guide | Whenever auth is needed — first use, 401 errors, or expired credentials | none |\n\n## Session Start Flow\n\n1. Invoke leetcode_learning_mode\n2. User picks a problem (daily challenge or search)\n3. Invoke leetcode_problem_workflow (problemSlug, difficulty)\n4. Invoke leetcode_workspace_setup (language, problemSlug, codeTemplate)\n5. Guide user with progressive hints (4 levels)\n6. Submit with submit_solution when ready\n\n## Learning Mode Rules\n\n- Never show a full solution without first working through hint levels 1 → 2 → 3\n- Level 1: Guiding questions (\"What pattern do you see?\")\n- Level 2: General approaches (\"Consider a hash map...\")\n- Level 3: Specific hints (\"Iterate once while tracking seen values...\")\n- Level 4: Pseudocode or partial implementation\n- Only show complete solutions when explicitly requested AFTER earlier hints have been delivered\n- get_problem_solution and list_problem_solutions return full community solutions — only use at Level 4 or on explicit \"show me the solution\" after hints\n\n## Auth Flow\n\n1. Before any auth-sensitive action, call check_auth_status first\n2. If not authenticated or expired → invoke leetcode_authentication_guide prompt (do NOT ad-hoc the instructions)\n3. The prompt guides: start_leetcode_auth → user extracts cookies → save_leetcode_credentials\n4. On success, retry the original action\n5. On any 401 from a tool: call check_auth_status → follow steps 2-4\n\n## Submission Language Map\n\n| User says | Pass this to submit_solution |\n|-----------|------------------------------|\n| Python / Python 3 | python3 |\n| Python 2 | python |\n| Java | java |\n| C++ | cpp |\n| JavaScript | javascript |\n| TypeScript | typescript |\n\nDefault: \"Python\" without version → python3",
              "tool": "get_started"
            },
            {
              "arguments": {
                "language": "python3",
                "titleSlug": "two-sum"
              },
              "reply": "{\"error\":\"Failed to start problem\",\"code\":\"UPSTREAM_ERROR\",\"message\":\"request to https://leetcode.com/graphql failed, reason: Client network socket disconnected before secure TLS connection was established\"}",
              "tool": "start_problem"
            },
            {
              "arguments": {
                "titleSlug": "two-sum"
              },
              "reply": "{\"error\":\"Failed to request hint\",\"code\":\"UPSTREAM_ERROR\",\"message\":\"request to https://leetcode.com/graphql failed, reason: Client network socket disconnected before secure TLS connection was established\"}",
              "tool": "request_hint"
            },
            {
              "arguments": {
                "titleSlug": "two-sum"
              },
              "reply": "{\"error\":\"Failed to request hint\",\"code\":\"UPSTREAM_ERROR\",\"message\":\"request to https://leetcode.com/graphql failed, reason: Client network socket disconnected before secure TLS connection was established\"}",
              "tool": "request_hint"
            },
            {
              "arguments": {
                "titleSlug": "two-sum"
              },
              "reply": "{\"titleSlug\":\"two-sum\",\"session\":null}",
              "tool": "get_session_state"
            },
            {
              "arguments": {
                "titleSlug": "two-sum"
              },
              "reply": "{\"error\":\"Failed to reset session\",\"code\":\"SESSION_NOT_FOUND\",\"message\":\"No active session for \\\"two-sum\\\". Call start_problem first.\"}",
              "tool": "reset_session"
            },
            {
              "arguments": {
                "titleSlug": "two-sum"
              },
              "reply": "{\"titleSlug\":\"two-sum\",\"session\":null}",
              "tool": "get_session_state"
            }
          ],
          "task": "Start a Python 3 practice session for two-sum, request two hints, check the session state, then reset it and check the state again."
        },
        "type": "noul"
      },
      "w06": {
        "criteria": {
          "false": "The tool replies show an error, a missing or different result, or nothing about the task; or only the agent's final answer claims the task was done.",
          "true": "The tool replies in `steps` show the result that `done_when` describes. The result came from the server's tools, not only from the agent's own words."
        },
        "instructions": {
          "agent_final_answer": "I couldn’t start the **Two Sum** session: the tool’s request to LeetCode failed because it couldn’t establish a network connection.\n\nThe local test did not run; the runner returned `SESSION_NOT_FOUND` because there was no active session. The session state is:\n\n```json\n{\"titleSlug\": \"two-sum\", \"session\": null}\n```",
          "done_when": "The local test reply shows PASS and a successful exit, and the session state shows the last local run passed.",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {},
              "reply": "# Interactive LeetCode MCP — Usage Guide\n\n## Prompts (must be explicitly invoked — not auto-active)\n\n| Prompt | When to invoke | Params |\n|--------|---------------|--------|\n| leetcode_learning_mode | START of any practice session, before discussing a problem | none |\n| leetcode_problem_workflow | Once the user selects a specific problem | problemSlug, difficulty |\n| leetcode_workspace_setup | After problem selection, before user starts coding | language, problemSlug, codeTemplate |\n| leetcode_authentication_guide | Whenever auth is needed — first use, 401 errors, or expired credentials | none |\n\n## Session Start Flow\n\n1. Invoke leetcode_learning_mode\n2. User picks a problem (daily challenge or search)\n3. Invoke leetcode_problem_workflow (problemSlug, difficulty)\n4. Invoke leetcode_workspace_setup (language, problemSlug, codeTemplate)\n5. Guide user with progressive hints (4 levels)\n6. Submit with submit_solution when ready\n\n## Learning Mode Rules\n\n- Never show a full solution without first working through hint levels 1 → 2 → 3\n- Level 1: Guiding questions (\"What pattern do you see?\")\n- Level 2: General approaches (\"Consider a hash map...\")\n- Level 3: Specific hints (\"Iterate once while tracking seen values...\")\n- Level 4: Pseudocode or partial implementation\n- Only show complete solutions when explicitly requested AFTER earlier hints have been delivered\n- get_problem_solution and list_problem_solutions return full community solutions — only use at Level 4 or on explicit \"show me the solution\" after hints\n\n## Auth Flow\n\n1. Before any auth-sensitive action, call check_auth_status first\n2. If not authenticated or expired → invoke leetcode_authentication_guide prompt (do NOT ad-hoc the instructions)\n3. The prompt guides: start_leetcode_auth → user extracts cookies → save_leetcode_credentials\n4. On success, retry the original action\n5. On any 401 from a tool: call check_auth_status → follow steps 2-4\n\n## Submission Language Map\n\n| User says | Pass this to submit_solution |\n|-----------|------------------------------|\n| Python / Python 3 | python3 |\n| Python 2 | python |\n| Java | java |\n| C++ | cpp |\n| JavaScript | javascript |\n| TypeScript | typescript |\n\nDefault: \"Python\" without version → python3",
              "tool": "get_started"
            },
            {
              "arguments": {
                "language": "python3",
                "titleSlug": "two-sum"
              },
              "reply": "{\"error\":\"Failed to start problem\",\"code\":\"UPSTREAM_ERROR\",\"message\":\"request to https://leetcode.com/graphql failed, reason: Client network socket disconnected before secure TLS connection was established\"}",
              "tool": "start_problem"
            },
            {
              "arguments": {
                "code": "class Solution:\n    def twoSum(self, nums, target):\n        seen = {}\n        for i, n in enumerate(nums):\n            if target - n in seen:\n                return [seen[target - n], i]\n            seen[n] = i\nassert Solution().twoSum([2, 7, 11, 15], 9) == [0, 1]\nprint('PASS')",
                "language": "python3",
                "titleSlug": "two-sum"
              },
              "reply": "{\"error\":\"Failed to run local tests\",\"code\":\"SESSION_NOT_FOUND\",\"message\":\"No active session for \\\"two-sum\\\". Call start_problem first.\"}",
              "tool": "run_local_tests"
            },
            {
              "arguments": {
                "titleSlug": "two-sum"
              },
              "reply": "{\"titleSlug\":\"two-sum\",\"session\":null}",
              "tool": "get_session_state"
            }
          ],
          "task": "Start a two-sum session and run this Python 3 code as a local test, then show the session state: \nclass Solution:\n    def twoSum(self, nums, target):\n        seen = {}\n        for i, n in enumerate(nums):\n            if target - n in seen:\n                return [seen[target - n], i]\n            seen[n] = i\nassert Solution().twoSum([2, 7, 11, 15], 9) == [0, 1]\nprint('PASS')"
        },
        "type": "noul"
      },
      "w07": {
        "criteria": {
          "false": "The tool replies show an error, a missing or different result, or nothing about the task; or only the agent's final answer claims the task was done.",
          "true": "The tool replies in `steps` show the result that `done_when` describes. The result came from the server's tools, not only from the agent's own words."
        },
        "instructions": {
          "agent_final_answer": "I couldn’t start the Two Sum session: the tool’s request to LeetCode failed because a network connection couldn’t be established.\n\nThe local test therefore did not run; the tool returned `SESSION_NOT_FOUND`. The session state is:\n\n```json\n{\"titleSlug\": \"two-sum\", \"session\": null}\n```",
          "done_when": "The local test reply shows PASS and a successful exit, and the session state shows the last local run passed.",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {},
              "reply": "# Interactive LeetCode MCP — Usage Guide\n\n## Prompts (must be explicitly invoked — not auto-active)\n\n| Prompt | When to invoke | Params |\n|--------|---------------|--------|\n| leetcode_learning_mode | START of any practice session, before discussing a problem | none |\n| leetcode_problem_workflow | Once the user selects a specific problem | problemSlug, difficulty |\n| leetcode_workspace_setup | After problem selection, before user starts coding | language, problemSlug, codeTemplate |\n| leetcode_authentication_guide | Whenever auth is needed — first use, 401 errors, or expired credentials | none |\n\n## Session Start Flow\n\n1. Invoke leetcode_learning_mode\n2. User picks a problem (daily challenge or search)\n3. Invoke leetcode_problem_workflow (problemSlug, difficulty)\n4. Invoke leetcode_workspace_setup (language, problemSlug, codeTemplate)\n5. Guide user with progressive hints (4 levels)\n6. Submit with submit_solution when ready\n\n## Learning Mode Rules\n\n- Never show a full solution without first working through hint levels 1 → 2 → 3\n- Level 1: Guiding questions (\"What pattern do you see?\")\n- Level 2: General approaches (\"Consider a hash map...\")\n- Level 3: Specific hints (\"Iterate once while tracking seen values...\")\n- Level 4: Pseudocode or partial implementation\n- Only show complete solutions when explicitly requested AFTER earlier hints have been delivered\n- get_problem_solution and list_problem_solutions return full community solutions — only use at Level 4 or on explicit \"show me the solution\" after hints\n\n## Auth Flow\n\n1. Before any auth-sensitive action, call check_auth_status first\n2. If not authenticated or expired → invoke leetcode_authentication_guide prompt (do NOT ad-hoc the instructions)\n3. The prompt guides: start_leetcode_auth → user extracts cookies → save_leetcode_credentials\n4. On success, retry the original action\n5. On any 401 from a tool: call check_auth_status → follow steps 2-4\n\n## Submission Language Map\n\n| User says | Pass this to submit_solution |\n|-----------|------------------------------|\n| Python / Python 3 | python3 |\n| Python 2 | python |\n| Java | java |\n| C++ | cpp |\n| JavaScript | javascript |\n| TypeScript | typescript |\n\nDefault: \"Python\" without version → python3",
              "tool": "get_started"
            },
            {
              "arguments": {
                "language": "python3",
                "titleSlug": "two-sum"
              },
              "reply": "{\"error\":\"Failed to start problem\",\"code\":\"UPSTREAM_ERROR\",\"message\":\"request to https://leetcode.com/graphql failed, reason: Client network socket disconnected before secure TLS connection was established\"}",
              "tool": "start_problem"
            },
            {
              "arguments": {
                "code": "class Solution:\n    def twoSum(self, nums, target):\n        seen = {}\n        for i, n in enumerate(nums):\n            if target - n in seen:\n                return [seen[target - n], i]\n            seen[n] = i\nassert Solution().twoSum([2, 7, 11, 15], 9) == [0, 1]\nprint('PASS')",
                "language": "python3",
                "titleSlug": "two-sum"
              },
              "reply": "{\"error\":\"Failed to run local tests\",\"code\":\"SESSION_NOT_FOUND\",\"message\":\"No active session for \\\"two-sum\\\". Call start_problem first.\"}",
              "tool": "run_local_tests"
            },
            {
              "arguments": {
                "titleSlug": "two-sum"
              },
              "reply": "{\"titleSlug\":\"two-sum\",\"session\":null}",
              "tool": "get_session_state"
            }
          ],
          "task": "Start a two-sum session and run this Python 3 code as a local test, then show the session state: \nclass Solution:\n    def twoSum(self, nums, target):\n        seen = {}\n        for i, n in enumerate(nums):\n            if target - n in seen:\n                return [seen[target - n], i]\n            seen[n] = i\nassert Solution().twoSum([2, 7, 11, 15], 9) == [0, 1]\nprint('PASS')"
        },
        "type": "noul"
      },
      "w08": {
        "criteria": {
          "false": "The tool replies show an error, a missing or different result, or nothing about the task; or only the agent's final answer claims the task was done.",
          "true": "The tool replies in `steps` show the result that `done_when` describes. The result came from the server's tools, not only from the agent's own words."
        },
        "instructions": {
          "agent_final_answer": "I attempted to start the **two-sum** session, but the tool couldn’t connect to LeetCode. The local test therefore did not run: it requires an active session.\n\nThe session state returned was:\n\n```json\n{\"titleSlug\":\"two-sum\",\"session\":null}\n```",
          "done_when": "The local test reply shows PASS and a successful exit, and the session state shows the last local run passed.",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {},
              "reply": "# Interactive LeetCode MCP — Usage Guide\n\n## Prompts (must be explicitly invoked — not auto-active)\n\n| Prompt | When to invoke | Params |\n|--------|---------------|--------|\n| leetcode_learning_mode | START of any practice session, before discussing a problem | none |\n| leetcode_problem_workflow | Once the user selects a specific problem | problemSlug, difficulty |\n| leetcode_workspace_setup | After problem selection, before user starts coding | language, problemSlug, codeTemplate |\n| leetcode_authentication_guide | Whenever auth is needed — first use, 401 errors, or expired credentials | none |\n\n## Session Start Flow\n\n1. Invoke leetcode_learning_mode\n2. User picks a problem (daily challenge or search)\n3. Invoke leetcode_problem_workflow (problemSlug, difficulty)\n4. Invoke leetcode_workspace_setup (language, problemSlug, codeTemplate)\n5. Guide user with progressive hints (4 levels)\n6. Submit with submit_solution when ready\n\n## Learning Mode Rules\n\n- Never show a full solution without first working through hint levels 1 → 2 → 3\n- Level 1: Guiding questions (\"What pattern do you see?\")\n- Level 2: General approaches (\"Consider a hash map...\")\n- Level 3: Specific hints (\"Iterate once while tracking seen values...\")\n- Level 4: Pseudocode or partial implementation\n- Only show complete solutions when explicitly requested AFTER earlier hints have been delivered\n- get_problem_solution and list_problem_solutions return full community solutions — only use at Level 4 or on explicit \"show me the solution\" after hints\n\n## Auth Flow\n\n1. Before any auth-sensitive action, call check_auth_status first\n2. If not authenticated or expired → invoke leetcode_authentication_guide prompt (do NOT ad-hoc the instructions)\n3. The prompt guides: start_leetcode_auth → user extracts cookies → save_leetcode_credentials\n4. On success, retry the original action\n5. On any 401 from a tool: call check_auth_status → follow steps 2-4\n\n## Submission Language Map\n\n| User says | Pass this to submit_solution |\n|-----------|------------------------------|\n| Python / Python 3 | python3 |\n| Python 2 | python |\n| Java | java |\n| C++ | cpp |\n| JavaScript | javascript |\n| TypeScript | typescript |\n\nDefault: \"Python\" without version → python3",
              "tool": "get_started"
            },
            {
              "arguments": {
                "language": "python3",
                "titleSlug": "two-sum"
              },
              "reply": "{\"error\":\"Failed to start problem\",\"code\":\"UPSTREAM_ERROR\",\"message\":\"request to https://leetcode.com/graphql failed, reason: Client network socket disconnected before secure TLS connection was established\"}",
              "tool": "start_problem"
            },
            {
              "arguments": {
                "code": "class Solution:\n    def twoSum(self, nums, target):\n        seen = {}\n        for i, n in enumerate(nums):\n            if target - n in seen:\n                return [seen[target - n], i]\n            seen[n] = i\nassert Solution().twoSum([2, 7, 11, 15], 9) == [0, 1]\nprint('PASS')",
                "language": "python3",
                "titleSlug": "two-sum"
              },
              "reply": "{\"error\":\"Failed to run local tests\",\"code\":\"SESSION_NOT_FOUND\",\"message\":\"No active session for \\\"two-sum\\\". Call start_problem first.\"}",
              "tool": "run_local_tests"
            },
            {
              "arguments": {
                "titleSlug": "two-sum"
              },
              "reply": "{\"titleSlug\":\"two-sum\",\"session\":null}",
              "tool": "get_session_state"
            }
          ],
          "task": "Start a two-sum session and run this Python 3 code as a local test, then show the session state: \nclass Solution:\n    def twoSum(self, nums, target):\n        seen = {}\n        for i, n in enumerate(nums):\n            if target - n in seen:\n                return [seen[target - n], i]\n            seen[n] = i\nassert Solution().twoSum([2, 7, 11, 15], 9) == [0, 1]\nprint('PASS')"
        },
        "type": "noul"
      }
    },
    "state": {
      "about": "Replies of an MCP server to tool calls that were sent with bad input on purpose, to see whether its error messages help a caller fix the call."
    }
  },
  "run_id": "01M8303HDCZ2Q6ZVD1264D5TMW",
  "works_done": [
    {
      "attempt": 0,
      "noul": 0.97,
      "question": "w00"
    },
    {
      "attempt": 1,
      "noul": 0.95,
      "question": "w01"
    },
    {
      "attempt": 2,
      "noul": 0.97,
      "question": "w02"
    },
    {
      "attempt": 3,
      "noul": 0.01,
      "question": "w03"
    },
    {
      "attempt": 4,
      "noul": 0.02,
      "question": "w04"
    },
    {
      "attempt": 5,
      "noul": 0.01,
      "question": "w05"
    },
    {
      "attempt": 6,
      "noul": 0.01,
      "question": "w06"
    },
    {
      "attempt": 7,
      "noul": 0.01,
      "question": "w07"
    },
    {
      "attempt": 8,
      "noul": 0.02,
      "question": "w08"
    }
  ]
}
