Skip to main content
Glama

void_contract

Void a teaching contract after displaying the void reason to the learner and recording their consent. Marks the contract inactive without deleting the original record.

Instructions

作废合约前,必须把作废理由原文展示给学习者,并取得学习者亲口的同意答复;learner_consent 填学习者的原话。未经同意调用属违纪。 作废不是删除——合约行原样保留,只是标记作废(active=false, voided_at=now(), void_reason=你传入的 reason)并从此退出"当前合约"选择(get_context/pickSkillStack/pair://contract/active 等一切现读, 见 lib/currentContract.ts)。幂等:对已作废的合约重复调用,原样返回其作废状态,不报错、不二次写入、不覆盖原 void_reason。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
reasonYes作废理由原文(必填,非空)——这是要先给学习者看过的那段话,也是留痕的一部分。
contract_idYes必须是已存在的 teaching_contracts id.
idempotency_keyNo可选。幂等键 (建议 uuid) —— 同一 key 重放此调用返回首次结果, 不重复写入. 网络重试/断线重连时带上同一个 key, 而不是猜"上次到底写没写".
learner_consentYes学习者的原话同意答复(必填,非空)。不是你替学习者写的摘要——她/他说了什么就填什么。
Behavior5/5

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

With no annotations provided, the description carries full burden and fully delivers. It specifies the exact side effects: 'active=false, voided_at=now(), void_reason=...' and that the contract exits current contract selection. It discloses idempotency behavior, stating repeated calls return the voided state without error, second write, or overwriting the original void_reason. This is comprehensive behavioral disclosure.

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 front-loaded with the most critical prerequisite (consent) and then compactly covers the effect, idempotency, and relationship to the read model. Every sentence earns its place; there is no fluff or repetition of schema content.

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

Completeness5/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 prerequisites, exact side effects, idempotency, and even references the implementation file (lib/currentContract.ts) for affected read paths. It is complete enough for an agent to correctly select and invoke the 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%, and each parameter already has detailed semantics (e.g., reason is the original text to show, learner_consent must be the learner's verbatim words, idempotency_key for retries). The description adds workflow context but does not materially extend the per-parameter meaning beyond the schema, so a baseline score of 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 uses the specific verb '作废合约' (void contract) and clearly defines the resource as a teaching contract. It distinguishes the behavior from deletion by stating '作废不是删除——合约行原样保留' (void is not delete—the contract row is preserved), which sets it apart from a destructive delete and implies it is a state transition. This is clear and differentiates from sibling tools like complete_contract in effect.

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 strong usage context: it mandates that the reason must be shown to the learner and consent obtained before calling, and states that unauthorized calls are a violation ('未经同意调用属违纪'). It also clarifies that this is not a deletion operation. However, it does not explicitly name alternative tools (e.g., complete_contract) or state when to prefer voiding over completing, so it lacks an explicit exclusion for those alternatives.

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