Skip to main content
Glama

grade_exercise

Grade an exercise submission by providing feedback and optional score. For already graded submissions, pass regrade: true to update the grade while preserving the previous verdict.

Instructions

批改一条 ExerciseSubmission. agent 异步收到 pair://exercises/pending 后调用. 判错递笔: score 给了且落进判错区间时, 回执带 concept_refs (这道题已解出的概念 id, 白拿, 不用你再走一遍 exercise→concept) + human_note 一句顺手提示——配不配张针对性闪卡纯属你裁量, 不进 next_recommended_actions, 不是义务。重批持证: 已 graded 的提交要改判, 必须显式带 regrade: true——缺省会被 CONFLICT 拒绝。改判自由, 痕迹免费: 放行时旧判决摘要 (previous_score/previous_feedback) 自动写进追加的 exercise.graded 事件 payload, 历史不蒸发。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scoreNo可选;0..1 的软评分(闭区间),85% 请写 0.85,不要写 85——server 会拒绝越界值
regradeNo改判意图声明: 该提交已有判决 (status=graded) 时必须显式传 true 才放行; 首判不需要。
feedbackYes
submission_idYes
idempotency_keyNo可选。幂等键 (建议 uuid) —— 同一 key 重放此调用返回首次结果, 不重复写入. 网络重试/断线重连时带上同一个 key, 而不是猜"上次到底写没写".
Behavior5/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It extensively details side effects and conditions: the wrong-answer flow includes concept_refs and human_note in the receipt, regrading requires explicit regrade: true to avoid CONFLICT, and successful regrading appends previous_score/previous_feedback to a new exercise.graded event. These disclosures go far beyond the schema and provide substantial transparency.

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 dense and covers multiple aspects (trigger, wrong-answer flow, regrade rules, event traces) in three sentences. Every sentence adds substantive value, though the structure is slightly run-on and could be broken into clearer points. It remains informative without being excessive.

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?

Given the tool's complexity and lack of output schema, the description provides a good overview of the main workflows: initial grading after async event, wrong-answer specifics, regrade requirements, and event trace behavior. However, it omits details about the correct-answer path (what happens if score is correct) and the full response structure. Despite these gaps, it covers the most critical aspects for an agent to 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 coverage is 60%, with score, regrade, and idempotency_key already documented in the schema. The description adds marginal nuance by mentioning the CONFLICT rejection for regrade without the flag, but does not clarify feedback or submission_id beyond their names. Since the schema already covers most parameter semantics, the description adds minimal additional value.

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's function: '批改一条 ExerciseSubmission' (grade an ExerciseSubmission), with a specific verb and resource. It also differentiates from siblings by describing the asynchronous trigger (pair://exercises/pending) and the specific grading workflow, which is distinct from other tools like add_exercise or get_submission.

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 should be called after receiving the async event pair://exercises/pending, and explicitly explains the regrade workflow (must pass regrade: true for already graded submissions, otherwise CONFLICT). However, it does not explicitly name alternative tools for related tasks, so it falls short of a perfect 5.

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

Install Server

Other Tools

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/sf-shenfeng/learn-shell'

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