Skip to main content
Glama

Codebreaker Solver

Tooling and C++ solutions for codebreaker.xyz, a Singapore Informatics Olympiad training platform with more than 2,000 problems.

This repository contains:

  • An HTML-scraping client for problem statements, submissions, profiles, and attachments.

  • A console CLI and MCP server with matching tool behavior.

  • Scripts for selecting unsolved problems, fetching statements, submitting solutions, and checking MCP/CLI parity.

  • One C++ solution file per solved problem under solve/.

  • A running log of solver traps and reusable techniques in LEARNINGS.md.

Requirements

  • Python 3.14

  • uv

  • A C++17 compiler for local solution testing

The Python package uses the MCP SDK v2, httpx2, Beautiful Soup, PyYAML, and pypdf.

Related MCP server: LeetCode MCP Server

Setup

uv sync

The console command is available through the project environment:

uv run codebreaker-mcp --help

Authentication

The site uses Google OAuth and a Flask session cookie. There is no API key.

Get the google-login-session cookie from browser developer tools while logged in to codebreaker.xyz, then store it locally:

uv run codebreaker-mcp login --cookie '<cookie>'
uv run codebreaker-mcp me

Forget the stored session with:

uv run codebreaker-mcp logout

Session precedence:

  1. CODEBREAKER_SESSION_COOKIE environment variable

  2. ~/.config/codebreaker-mcp/session.json

The stored file is restricted to the current user. Never commit or paste session cookies.

CLI

Data commands print YAML by default. Use --format json when output is consumed by scripts.

# Authentication and profile
uv run codebreaker-mcp me
uv run codebreaker-mcp profile <username>

# Problem discovery and statements
uv run codebreaker-mcp problems --status unsolved --limit 10
uv run codebreaker-mcp problem helloworld
uv run codebreaker-mcp attachment <problem_id>

# Submission history and verdicts
uv run codebreaker-mcp submissions --problem helloworld
uv run codebreaker-mcp submission <submission_id>

# Submit and wait
uv run codebreaker-mcp submit helloworld \
  --language "Python 3" \
  --code-file solution.py
uv run codebreaker-mcp wait <submission_id>

Available data commands:

Command

Purpose

me

Show authentication state, username, and role.

problems

List problems with command, status, tag, exclusion, limit, and offset filters.

problem <id>

Fetch statement text, constraints, subtasks, samples, editorials, and cached PDF information.

submissions

List submissions with problem, username, and page filters.

submission <id>

Show testcase verdicts, compile errors, and submitted source where available.

profile <username>

Show user information and solved problems.

attachment <id>

Download a problem attachment to a local path.

submit <id>

Submit Python, C++, or Communication source.

wait <id>

Poll a submission until grading completes.

python -m codebreaker_mcp remains supported as an alternative entry point.

MCP server

Run the server over stdio for an MCP client:

uv run codebreaker-mcp serve

Run the Streamable HTTP transport when a network endpoint is needed:

uv run codebreaker-mcp serve --transport http --port 8080

The server exposes these tools:

  • codebreaker_me

  • codebreaker_list_problems

  • codebreaker_get_problem

  • codebreaker_list_submissions

  • codebreaker_get_submission

  • codebreaker_get_profile

  • codebreaker_get_attachment

  • codebreaker_submit

  • codebreaker_wait_submission

The CLI and MCP server share the same client methods and response semantics. CodebreakerError is surfaced as an MCP error result.

Solving workflow

The repository's batch workflow is:

  1. Select the next unsolved tier:

    uv run python scripts/top_unsolved.py 10
  2. Fetch statements. This writes /tmp/stmt_<problem_id>.txt:

    uv run python scripts/fetch_statements.py <problem_id>...
  3. Write one solution per problem as solve/<problem_id>.cpp.

  4. Use the canonical C++17 style described in AGENTS.md and read LEARNINGS.md before starting.

  5. Test samples and relevant edge cases locally with code_runner.

  6. Submit a batch and wait for verdicts:

    uv run python scripts/submit_solve.py \
      problem_a solve/problem_a.cpp \
      problem_b solve/problem_b.cpp
  7. Treat the judge verdict as authoritative. A non-100 result requires re-reading the full statement and fixing the source before resubmitting.

Communication and interactive problems use their grader-defined interfaces rather than a normal main() function. Check the statement and attachment before writing those solutions.

Statements and attachments

codebreaker.xyz does not expose a stable JSON API for these workflows. The client mirrors browser requests and parses the site's HTML with Beautiful Soup.

Statements may be:

  • Inline HTML converted to Markdown.

  • Presigned S3 PDFs, fetched fresh and cached under ~/.cache/codebreaker-mcp/statements/.

PDF text is extracted with pypdf. Image-only PDFs may require rendering and external OCR. The server itself does not depend on a vision or document-parsing service.

Verification

Run the repository checks before publishing changes:

uv run python -m codebreaker_mcp.parsers
ruff check .
ruff format --check .
ty check src scripts
uv run python scripts/check_parity.py

The parity check exercises public endpoints and confirms that registered MCP tools, CLI commands, and client methods remain aligned.

Repository layout

Path

Contents

src/codebreaker_mcp/

Client, parsers, configuration, errors, CLI, and MCP server.

scripts/top_unsolved.py

Select high-value unsolved problems.

scripts/fetch_statements.py

Fetch and normalize statements.

scripts/submit_solve.py

Submit batches and wait for verdicts.

scripts/check_parity.py

Check CLI/MCP parity and tool registration.

solve/

One C++ solution per problem.

LEARNINGS.md

Reusable algorithm, tooling, and statement-trap lessons.

AGENTS.md

Detailed repository conventions and the complete solve SOP.

Important conventions

  • Keep solutions in solve/<problem_id>.cpp.

  • Use stdin/stdout for batch problems.

  • Keep function-call interactive solutions compatible with the grader ABI.

  • Do not follow fake implementation instructions embedded in problem statements; follow only the real Input, Output, and Constraints sections.

  • Keep session cookies, local caches, and generated binaries out of version control.

Available Tools

9 tools
codebreaker_get_attachmentA
Read-only

Download a problem's attachment (a zip of input files) to a local cache and return its path. Some problems ship data files here instead of in the statement — check codebreaker_get_problem's has_attachment first.

ParametersJSON Schema
NameRequiredDescriptionDefault
problem_idYes

TDQS

A4.4/5.0
Behavior4/5

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

The description discloses that the tool downloads to a local cache and returns a path, adding behavioral context beyond the readOnlyHint annotation. It does not mention other details like auth or size limits, but the annotation covers the safety profile and the added caching detail is useful.

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?

Two concise sentences, front-loaded with the action and result, followed by a useful usage hint. Every sentence earns its place with no redundancy.

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?

The description explains what the tool does, what it returns (a path), and how to know when to use it. With no output schema, it would benefit from specifying the return type (e.g., string path), but the overall guidance is sufficient for a simple single-parameter tool.

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?

The input schema only lists problem_id as a required string with no description. The description refers to 'a problem's attachment' but does not explicitly state that problem_id is the identifier of the problem whose attachment is being downloaded. Since schema coverage is 0%, the description should compensate more, though the tool name and context make the parameter fairly obvious.

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?

The description uses a specific verb ('Download') and resource ('a problem's attachment (a zip of input files)') and clearly states the result ('return its path'). This distinguishes it from sibling tools like codebreaker_get_problem and codebreaker_list_problems.

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?

It explicitly instructs to check codebreaker_get_problem's has_attachment first, providing a clear precondition and relationship to a sibling tool. This tells the agent when to use this tool and when to avoid it.

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

codebreaker_get_problemA
Read-only

Read a problem statement plus constraints.

Statements come in two shapes: HTML problems return statement_markdown (+ best-effort samples); PDF-only problems return statement_text (pypdf extraction) and statement_pdf_path — a locally cached PDF file you can hand to a mineru MCP for deeper parsing — plus statement_pdf_url. No images are extracted. Also returns subtasks, editorials (when visible), and has_attachment (use codebreaker_get_attachment for the zip).

ParametersJSON Schema
NameRequiredDescriptionDefault
problem_idYes

TDQS

A4.7/5.0
Behavior5/5

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

Despite the readOnlyHint annotation, the description adds substantial behavioral detail: two possible statement shapes, best-effort samples, pypdf extraction, a locally cached PDF path, no image extraction, and optional subtasks/editorials. This goes well beyond the annotation and helps the agent predict the tool's variations.

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?

The description is front-loaded with a clear one-sentence purpose, followed by a well-organized paragraph covering variations, edge cases, and alternatives. Every sentence provides useful information, with no filler or redundancy.

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?

With no output schema, the description carries the full burden of explaining return values, and it does so thoroughly: statement_markdown vs statement_text, PDF path and URL, no images, subtasks, editorials, and the has_attachment flag. It is complete enough for an agent to select and use the tool confidently.

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?

The only parameter, problem_id, has no schema description and the tool description does not explicitly explain where to obtain it or how it is formatted. However, the parameter name is self-explanatory given the tool's purpose, and no other parameters exist. The description offers some context about what the problem_id refers to but doesn't fully compensate for the 0% schema coverage.

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?

The description opens with 'Read a problem statement plus constraints,' which gives a specific verb and resource. It clearly distinguishes itself from sibling tools like codebreaker_list_problems and codebreaker_get_attachment by focusing on the problem statement content.

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?

The description provides explicit contextual guidance: it states that attachment zips should be fetched using codebreaker_get_attachment, and that PDF-only problem statements can be handed to a mineru MCP for deeper parsing. It also notes that no images are extracted, setting expectations about what this tool does not do.

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

codebreaker_get_profileA
Read-only

View a user's profile: name, school, role, country, and their solved problems. Useful to check your own solved set or a peer's progress.

ParametersJSON Schema
NameRequiredDescriptionDefault
usernameYes

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, indicating a safe read operation. The description adds value by detailing the returned data (name, school, role, country, solved problems). It does not contradict annotations and provides useful behavioral context.

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?

Two sentences with no redundancy. The first sentence states the action and outputs, the second provides the use case. Every word earns its place.

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 simple single-parameter tool with readOnlyHint and no output schema, the description covers the purpose, return fields, and a typical usage scenario. Minor gaps like error handling or output format details are not critical for this low-complexity tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must clarify the parameter. The description's mention of 'a user's profile' and 'peer's progress' clearly implies the username identifies whose profile to view, adding semantic meaning beyond the bare schema.

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?

The description clearly states 'View a user's profile' and enumerates the specific fields (name, school, role, country, solved problems). It differentiates from siblings by focusing on any user's profile and the use case of checking peer progress.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides a clear usage context: 'Useful to check your own solved set or a peer's progress.' It implies when to use it (for any username) but does not explicitly contrast with alternatives like codebreaker_me, which would merit a 5.

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

codebreaker_get_submissionA
Read-only

Get full submission results: score, per-subtask and per-testcase verdicts (AC/WA/PS/TLE/MLE/RTE/UG/:(), times and memory, compile error if any, and the submitted code (only for your own submissions).

pending=true means grading is not finished — use codebreaker_wait_submission instead of polling manually.

ParametersJSON Schema
NameRequiredDescriptionDefault
submission_idYes

TDQS

A4.6/5.0
Behavior5/5

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

The description discloses important behavioral details beyond the readOnlyHint annotation: the submitted code is only available for your own submissions, and the pending=true state indicates incomplete grading. These are not inferable from the annotation alone, adding genuine transparency.

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?

The description is two sentences, front-loaded with the main purpose (get full submission results) and then a concise caveat about pending submissions. Every sentence earns its place, with no fluff.

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 simple one-parameter tool, the description covers the return structure comprehensively (score, per-subtask/per-testcase verdicts, times, memory, compile error, code), plus the ownership constraint and pending behavior. Since there is no output schema, this is fully sufficient.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description does not add any meaning to the submission_id parameter; it only appears in the schema as an integer with no further explanation. With 0% schema description coverage, the description should compensate but does not clarify where the ID comes from or any constraints beyond its name.

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?

The description uses a specific verb 'Get' and clearly lists all elements of the full submission results (score, verdicts, times, memory, compile error, code). It also distinguishes itself from siblings like codebreaker_list_submissions and codebreaker_wait_submission by explicitly stating the full result scope and the pending condition.

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?

The description provides explicit guidance: when pending=true, use codebreaker_wait_submission instead of polling manually. This names the alternative tool directly and gives a clear condition for when to use it, which is excellent usage guidance.

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

codebreaker_list_problemsA
Read-only

List problems with status (solved/partial/attempted/not_attempted), tags, problem type, and AC counts.

Your-score status requires login (scores show N/A when logged out). command: 'all' (default, sorted by #AC), 'newest', 'unsolved', or 'recommended' (both of the last two require login). Filter further with status=, tag= (include), and exclude_tags= (exclude; Joke problems are dropped by default); page with offset/limit.

ParametersJSON Schema
NameRequiredDescriptionDefault
tagNo
limitNo
offsetNo
statusNoany
commandNoall
exclude_tagsNoTags to exclude (case-insensitive substring match). Defaults to ['Joke'] so joke problems don't waste the agent's time; pass [] to include everything.

TDQS

A4.3/5.0
Behavior4/5

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

The readOnlyHint annotation already marks this as safe, but the description adds valuable context: login-dependent status display, login requirements for certain commands, and the default exclusion of Joke problems. These behaviors are not inferred from the annotation and help set expectations.

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?

The description is concise and front-loaded, using a compact paragraph with semicolon-separated details. It covers commands, filters, and pagination without redundancy, though the density might make it slightly harder to parse at a glance.

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 listing tool with no output schema, the description provides sufficient details about return fields, filtering, and pagination. It also notes login dependencies, which is complete enough for an agent to select and safely invoke the tool. No output schema is needed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is only 17%, but the description compensates well by explaining command values, the effect of status/tag/exclude_tags, and offset/limit pagination. It doesn't fully enumerate every enum value (e.g., status 'any' or 'unsolved' as a status), but it provides enough practical semantics for correct usage.

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?

The description begins with 'List problems' — a specific verb and resource — and enumerates the returned fields (status, tags, type, AC counts). This clearly distinguishes it from sibling tools like codebreaker_get_problem, which retrieves a single problem, and codebreaker_list_submissions, which lists submissions.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explains the command options and their login requirements ('both of the last two require login') and filter parameters (status, tag, exclude_tags) with pagination. However, it does not explicitly state when to prefer this over alternatives or when not to use it, so it stops short of a full 5.

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

codebreaker_list_submissionsA
Read-only

List submissions, optionally filtered by problem and/or user.

Pass username= (from codebreaker_me) to see your own submissions; omit both filters for all submissions. 25 per page; has_next/has_previous tell you when more pages exist.

ParametersJSON Schema
NameRequiredDescriptionDefault
pageNo
usernameNo
problem_idNo

TDQS

A4.2/5.0
Behavior4/5

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

Annotations declare readOnlyHint=true, and the description adds useful behavioral details such as pagination (25 per page, has_next/has_previous) and filter semantics. It goes beyond the annotation without contradicting it.

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?

The description is three tight sentences, front-loaded with the core purpose and each sentence adding value: purpose, filter usage, and pagination behavior. No fluff.

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 read-only list tool, the description covers purpose, filter options, and pagination. It does not describe return fields, but no output schema is provided, and the description is adequate for an agent to select and invoke the tool correctly.

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 0%, so the description must compensate. It explains the username and problem filters in prose, but the page parameter is not mentioned. While page is straightforward with a default, the description does not fully cover all three parameters.

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?

The description clearly states the tool lists submissions with optional filters by problem and/or user. This distinguishes it from sibling tools like get_submission (single submission) and submit (create).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides clear context on using the username filter to see your own submissions and omitting filters for all. It also mentions using codebreaker_me for the username. However, it does not explicitly say when to prefer this over get_submission, though sibling context makes this obvious.

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

codebreaker_meA
Read-only

Report the authenticated codebreaker.xyz user.

Returns authenticated=true with username/role when the stored session cookie works, otherwise authenticated=false with instructions.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.3/5.0
Behavior4/5

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

Beyond the readOnlyHint annotation, the description discloses conditional behavior: it returns authenticated=true with username/role on success, and authenticated=false with instructions on failure. This adds useful context about the tool's response logic, though it does not describe potential edge cases or rate limits.

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?

The description is two sentences, front-loaded with the main purpose, and contains no fluff. Every sentence adds value: the first states what it does, the second explains the return behavior.

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?

With no output schema and no parameters, the description is the only source of return information. It fully covers both outcomes (authenticated true/false) and explains what the response contains, making it complete for this simple tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, and the schema is empty, so there is no parameter complexity. Per the rubric, a baseline of 4 applies, and the description does not need to add parameter details. It correctly references the session cookie as an implicit context, not a parameter.

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?

The description uses specific verb 'Report' and resource 'authenticated codebreaker.xyz user', clearly distinguishing it from sibling tools like codebreaker_get_profile or codebreaker_list_problems. It immediately states the core function without ambiguity.

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?

The description implies usage for checking authentication status but does not explicitly say when to use it or mention alternatives. It lacks explicit when-to-use guidance, such as 'use this to verify the session', and does not exclude other tools.

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

codebreaker_submitA

Submit a solution for evaluation.

Submissions are automatically spaced ~2s apart. Returns the submission id; call codebreaker_wait_submission on it to get verdicts. For Communication problems pass code_b (two programs are graded together).

ParametersJSON Schema
NameRequiredDescriptionDefault
codeYes
code_bNo
languageYes
problem_idYes

TDQS

A4.2/5.0
Behavior4/5

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

The description discloses useful behavioral details beyond the annotations: automatic spacing, the return of a submission ID, and the need to poll with wait_submission. It also notes the special case for Communication problems. No contradiction with annotations (openWorldHint=true, destructiveHint=false).

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?

The description is concise: three sentences, front-loaded with the main action, followed by necessary caveats and usage instructions. Every sentence adds value with no redundancy or fluff.

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?

The description is complete enough for a submission tool: it covers the return value, how to retrieve verdicts, rate limiting, and a special parameter case. It does not describe error handling or response format, but given the simple schema and sibling tool context, this is a minor gap.

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?

With zero schema description coverage, the description compensates by explaining the optional code_b parameter and its purpose. However, it does not add meaningful detail for problem_id, language, or code (which are fairly self-explanatory), so it provides partial but not complete parameter semantics.

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?

The description opens with 'Submit a solution for evaluation,' a specific verb and resource that clearly distinguishes this tool from the sibling get/list/wait tools. It unambiguously identifies the tool's primary function.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear usage context: it mentions the 2-second spacing, instructs to call codebreaker_wait_submission on the returned ID, and explains when to pass code_b for Communication problems. It lacks explicit when-not-to-use guidance, but as the only submission tool, no alternative is needed.

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

codebreaker_wait_submissionA
Read-only

Poll a submission until grading finishes, then return the full result (same shape as codebreaker_get_submission). Fails after timeout seconds if the grader is still running.

ParametersJSON Schema
NameRequiredDescriptionDefault
timeoutNo
submission_idYes

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, so the read-only nature is covered. The description adds the timeout failure behavior and clarifies the return shape matches codebreaker_get_submission, which is useful beyond annotations. It does not detail error types or polling interval, but provides solid context for a polling tool.

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?

Two sentences, front-loaded with the primary action, and no filler. Every word contributes either purpose or a critical behavior, making it exceptionally concise and well-structured.

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?

The tool is simple, and the description covers purpose, timeout behavior, and return shape. It does not specify behavior for an already-graded submission or polling frequency, but these are minor given the context. The description is sufficient for an agent to select and invoke the tool correctly.

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?

With 0% schema coverage, the description bears the burden of explaining parameters. It mentions 'timeout seconds', providing units for the timeout parameter, but does not explain submission_id or the optionality/default of timeout. Parameter names are self-explanatory, but only minimal value is added beyond the schema.

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?

The description explicitly states a specific verb ('Poll') and resource ('a submission'), with a clear outcome ('until grading finishes, then return the full result'). It distinguishes itself from siblings like codebreaker_get_submission by focusing on the waiting/polling action, making the purpose unmistakable.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description clearly implies usage when you need to wait for grading to complete, and mentions the timeout behavior. It does not explicitly exclude alternatives like codebreaker_get_submission for already-completed submissions, but the polling context is evident and sufficient for an agent to choose it appropriately.

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

TDQS

A4.5/5.0
Disambiguation5/5

Each tool targets a distinct resource and action: authentication, problem listing, problem details, submission listing, submission details, profile viewing, attachment download, submission creation, and waiting for grading. No two tools have overlapping purposes.

Naming Consistency5/5

All tool names follow the codebreaker_<verb>_<noun> pattern, with 'me' as a minor exception but still clear. The verbs (list, get, submit, wait) are consistent and predictable.

Tool Count5/5

9 tools is well-scoped for a competitive programming judge client, covering the full workflow without unnecessary bloat or missing essentials.

Completeness5/5

The tool surface covers the complete problem-solving lifecycle: authentication, browsing problems, reading statements, downloading attachments, submitting solutions, waiting for results, and reviewing submissions and profiles. No obvious gaps remain.

Maintenance

ActivityMaintained
ResponsivenessSyncing

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/yuzu-octopus/Codebreaker_Solver'

If you have feedback or need assistance with the MCP directory API, please join our Discord server