Skip to main content
Glama

submit_answers

Submit objective and programming answers to an exam, returning judge results for programming questions. Preview the submission plan with dry-run before finalizing.

Instructions

提交答案:客观题按题型整卷提交,编程题逐题提交并回传判题结果。

答案形如(每个题型一段,可给列表): {"problemType": "TRUE_OR_FALSE", "details": [{"problemSetProblemId": "...", "answer": "TRUE"}]} {"problemType": "MULTIPLE_CHOICE", "details": [{"problemSetProblemId": "...", "answer": "B"}]} {"problemType": "PROGRAMMING", "details": [{"problemSetProblemId": "...", "program_path": "programs/p1.py"}]}

Args: exam_id: 考试 ID(来自 pta_list_exams)。 answers: 上述结构(或它们的列表);大体积答案用 answers_file 指向 work/ 下的 JSON,避免在对话里重复贴。 answers_file: work/ 下 JSON 文件路径,内容同 answers(整卷归档时给列表,每个题型一段)。 dry_run: True(默认)只回提交计划,确认后传 False。

Input Schema

NameRequiredDescriptionDefault
answersNo
dry_runNo
exam_idYes
answers_fileNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses that dry_run=True returns only a submission plan (a safe preview), that programming submissions return judge results, and that answers_file avoids re-pasting large JSON. It does not cover failure modes, resubmission/overwrite semantics, or auth requirements, which keeps it from a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

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

Front-loads the submit semantics, then args, then payload examples — a sensible order with little waste. The example blocks are justified by the 0% schema coverage, though 'answers: 上述结构(或它们的列表)' partially repeats the opening sentence.

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 4-parameter mutation tool with no annotations and no output schema, the description covers invocation, payload construction, and the dry-run confirmation loop. It leaves the shape of the dry-run plan and the returned judge results implicit, which the missing output schema makes a real gap.

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

Parameters5/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 and it does: all four parameters are explained, including the exact per-problem-type JSON shape with worked examples, the list-vs-object distinction for answers, the answers_file path convention and its equivalence to answers, and dry_run's default and effect.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('提交答案') and immediately splits the behavior into two concrete modes: whole-exam submission for objective question types versus per-problem submission with judge-result feedback for programming questions. An agent can tell this apart from the sibling list/detail tools without opening any schema.

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?

Gives actionable routing context: exam_id is sourced from pta_list_exams, large payloads should use answers_file under work/ instead of pasting JSON into the conversation, and dry_run defaults to True so the agent previews a plan before confirming with False. It stops short of stating exclusions (e.g. when not to resubmit or how this relates to pta_submission_detail), so not a 5.

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