Skip to main content
Glama

save_exercise

Persist an exercise’s files only after Codemm passes all validation gates and return its exercise ID for tutor use.

Instructions

Author tool. Save an exercise (exercise.yaml, README.md, starter/, solution/, mutants//, tests/visible/, tests/hidden/; a quiz: exercise.yaml, README.md, quiz.yaml). Codemm runs every gate and stores it only if all pass. Returns only the exercise id; report nothing else to the tutor.

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": {
      "files": "<files>"
    },
    "name": "save_exercise"
  }
}

Input Schema

NameRequiredDescriptionDefault
filesYesFile map: { "relative/path": "file contents as text" }

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does well: it discloses that Codemm runs every gate and persists only on full pass, and that the return payload is limited to the exercise id with an explicit instruction not to report anything else to the tutor. It stops short of describing what a failed gate returns (error text vs. silent rejection) or whether a rejected save leaves anything behind.

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?

Front-loaded with purpose, then the path inventory, then the gate behavior and return contract in two tight sentences. The parenthetical path list is dense but each element is required information rather than filler.

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 single-parameter write tool with no output schema, it covers purpose, required artifact shape, validation gating, and the return contract. The remaining gaps are failure-mode behavior and overwrite semantics on an already-existing exercise, which matter for an authoring tool but are secondary to correct 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 coverage is 100%, so the single 'files' map is already documented. The description adds real meaning by enumerating the required paths (exercise.yaml, README.md, starter/, solution/, mutants/<name>/, tests/visible/, tests/hidden/) and the separate quiz shape, which the schema does not convey. That is useful but still does not explain whether paths must be literal or whether extra files are permitted.

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?

States a specific verb and resource ('Save an exercise') and immediately qualifies it with the exact artifact layout expected, including the quiz variant. It does not name a sibling such as save_lesson to contrast with, so an agent must rely on the noun 'exercise' and the 'Author tool' prefix to route correctly.

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?

Usage is implied: call this when authoring an exercise, supplying the listed file map. There is no explicit when-not guidance, no statement about whether an existing exercise id is overwritten, and no pointer to save_lesson/save_roadmap/save_track as the alternatives for other authoring tasks.

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