Skip to main content
Glama

lesson_upsert

Add or revise a capability point's explanation, standalone example, and resource references within an existing study path.

Instructions

在当前路径补充或修正一个能力点的讲解、独立例题和资源引用。

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "session_id": "<session_id>",
      "node_code": "<node_code>",
      "base_version": "<base_version>",
      "teaching": "<teaching>"
    },
    "name": "lesson_upsert"
  }
}

Input Schema

NameRequiredDescriptionDefault
teachingYes
node_codeYes
session_idYes
base_versionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden for a mutation tool, and it largely fails to. It does not disclose that base_version is a concurrency/version guard, what happens on a version mismatch, whether existing fields are replaced or merged, whether cards/new_terms counts are enforced, or whether the call returns the updated lesson. The only behavioral signal is the word '修正' implying overwrite of existing content.

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?

A single front-loaded sentence with no filler, and the upsert nature is stated first. It is efficient rather than padded; the shortfall is under-specification, not verbosity, so conciseness itself is good.

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?

The tool has a deeply nested teaching object (cards, terms, example, minutes, pitfalls, new_terms, resource_ids, max_new_terms), four required parameters, no annotations, and no output schema. Against that complexity, one sentence naming three content areas is far too thin: version-conflict behavior, session/node scoping, and the new-terms limits are all undocumented, leaving real risk of incorrect invocation.

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 0% at the parameter level, and the description never mentions session_id, node_code, or base_version at all. It does partially map to the teaching payload by naming '讲解' (explanation), '独立例题' (example), and '资源引用' (resource_ids), which gives an agent a rough correspondence to three nested fields, so it adds marginal meaning beyond the schema but leaves the critical versioning parameter entirely unexplained.

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

Purpose4/5

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

The description uses a specific verb pair ('补充或修正', i.e. supplement or correct, which conveys upsert semantics) applied to a concrete resource: the explanation, standalone example, and resource references for a competency point ('能力点'). An agent can tell this writes lesson content rather than reading it, but the description never names the sibling read counterpart lesson_get or any other alternative, so differentiation is only implicit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance on when to call this versus lesson_get, map_upsert, or note_upsert, nor any prerequisite statement. The phrase '在当前路径' hints that a path context must already exist, but it never says a session must be active, that base_version must come from a prior read, or what to do when the content already exists versus being new. The agent must infer all routing and preconditions.

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