Skip to main content
Glama

update_code_test_cases

Update programming question answer code and test cases by providing new reference code and input test cases; existing cases are replaced.

Instructions

更新编程题答案代码和测试用例(会覆盖原用例)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
question_idYes题目id(通过 query_paper 获取)
answer_item_idYes编程答案项 ID(内部字段,系统自动赋值,无需手填)
program_setting_idYes编程配置 ID(内部字段,系统自动赋值,无需手填)
code_answerYes运行测试用的参考代码(规则同 CODE_ANSWER_DESC)
answer_languageYes参考答案语言,必须和 code_answer 实际语言一致(c / c++ / java / python3 / go / rust 等 20 种)
in_casesYes测试用例输入列表,格式 [{"in": "内容"}, ...],至少 1 条。只传输入,期望输出由平台跑 code_answer 自动生成;多行输入一条里用 \n 分隔。
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It adds the key behavioral detail that the operation overwrites original test cases, but does not disclose other traits like auth requirements, rollback possibility, or effect on other data.

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 a single Chinese sentence that efficiently conveys the tool's purpose and a key behavioral trait (overwriting). It is front-loaded with the action and resource.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With 6 required parameters, no output schema, and no annotations, the description is too brief. It fails to explain return values, error conditions, or success/failure indicators. The overwrite warning is useful but incomplete for a complex mutation 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?

Schema description coverage is 100%, with each parameter having a clear description in Chinese. The tool description adds no additional parameter information beyond the schema, so baseline 3 is appropriate.

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 it updates programming question answer code and test cases, with the specific behavior of overwriting original test cases. This verb+resource structure distinguishes it from sibling tools like create_code_question (creation) or delete_answer_item (deletion).

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?

No explicit guidance on when to use this tool versus alternatives. The description implies usage for modifying existing test cases, but lacks when-not scenarios or prerequisites. It is clear enough for a typical update operation.

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/Sav1ouR520/xiaoya-teacher-mcp-server'

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