Skip to main content
Glama

update_contract_coverage

Adjust a teaching contract's covered course list (actual taught courses) by adding or removing valid course IDs, with idempotency support and no edits allowed after contract completion.

Instructions

修改一份合约的 covered_course_ids 覆盖单(这份合约名下实际教过的课程清单, 不是许可范围声明) —— {add_course_ids?, remove_course_ids?} 至少传一个非空数组。去重(加了两遍/加了已存在的不报错), 并校验每个 course_id 存在且属于同一个 pair(不属于/不存在直接拒绝, 不静默忽略)。已结业的合约(completed_at 非空)拒改——结业是终态, 覆盖单在那一刻定格, 想续教开新合约。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contract_idYes必须是已存在的 teaching_contracts id.
add_course_idsNo要并入覆盖单的 course id
idempotency_keyNo可选。幂等键 (建议 uuid) —— 同一 key 重放此调用返回首次结果, 不重复写入. 网络重试/断线重连时带上同一个 key, 而不是猜"上次到底写没写".
remove_course_idsNo要从覆盖单移除的 course id
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 and thoroughly discloses behavioral traits: dedupe semantics, validation rejection (not silent ignore) for invalid or non-pair course IDs, and the terminal state rule for completed contracts. It leaves little ambiguity about edge cases and side effects.

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 dense paragraph, but every clause earns its place: purpose, validation rules, dedupe behavior, and terminal-state restriction. There is no filler or redundant wording, making it efficient for an agent to parse.

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 mutation tool with no annotations and no output schema, the description covers purpose, constraints, validation, dedupe, and lifecycle restrictions, which is strong. It lacks an explicit description of the return value or success/failure response, but the behavioral specification is otherwise complete.

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 schema provides 100% parameter descriptions, so the baseline is 3. The description adds meaningful semantics by stating that at least one of add_course_ids or remove_course_ids must be a non-empty array, and explains dedupe/validation behavior beyond what the schema covers.

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 the specific verb '修改' (modify) with the resource 'covered_course_ids 覆盖单' and clarifies it is the list of actually taught courses, not the license scope. This clearly distinguishes it from sibling tools like update_contract_cadence or complete_contract.

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 explicitly states that completed contracts (completed_at non-null) are rejected and directs users to open a new contract to continue teaching, providing an exclusion and alternative behavior. It implies usage for active contracts, though it does not name sibling tools directly.

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