Skip to main content
Glama

Judge a stored problem

judge_problem
Read-only

Judge code against one of your stored problems.

Runs the problem's tests and returns a verdict, a score, a summary, a submission id, a signed receipt, and the problem id and version. Hidden tests return only their verdict, never their input or expected output. It never invents results: if the problem is missing or the run fails, you get an error.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "problem": "<problem>",
      "compiler": "<compiler>",
      "code": "<code>"
    },
    "name": "judge_problem"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYesThe source code to judge
modeNo'all' runs every test (default); 'samples' runs only the sample tests.all
problemYesThe id or slug of one of your stored problems
compilerYesCompiler identifier (e.g. 'python-3.14', 'gcc-15'). Use list_compilers to see all options.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4/5.0
Behavior4/5

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

Adds real context beyond the annotations: hidden tests return only a verdict and never their input or expected output, and failures or missing problems produce errors rather than fabricated results. This is meaningful disclosure for a judging tool. Minor tension: it returns a submission id and signed receipt, implying a persisted run, which sits slightly awkwardly with readOnlyHint=true, but that is an ambiguity rather than a direct contradiction.

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?

Front-loaded with the core action in the first clause, then the return contents, then the hidden-test caveat and the error contract. Every sentence carries information an agent cannot get from the schema or annotations.

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?

With 4 parameters, three required, an output schema present, and annotations covering the safety profile, this is nearly complete: it explains return contents, hidden-test opacity, and failure behavior. The remaining gap is operational—no indication of cost or latency for a full 'all'-mode judging run, which matters since the tool executes code.

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 coverage is 100% and each parameter already carries its own description, including the 'all' vs 'samples' mode semantics and the compiler example. The description adds only the hidden-test behavior, which indirectly explains why 'samples' mode is cheap, but nothing beyond the schema about problem, compiler, or code.

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?

Specific verb and resource: 'Judge code against one of your stored problems,' with the scope constraint that the tests come from the problem rather than from the caller. That scope distinguishes it functionally from run_code and run_tests, which take code/tests directly, so an agent can route correctly without opening schemas.

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

Usage Guidelines3/5

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

Usage is implied rather than stated: the agent must already have a stored problem to call it, and the 'samples' mode gives a cheap scoping option. However, there is no explicit when-to-use/when-not guidance and no mention of when to prefer run_code or run_tests instead of judging against a stored problem.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.