Skip to main content
Glama

moodle_quiz_save_answers

Destructive

Save quiz answers to an in-progress Moodle attempt without submitting it and return the attempt state; use exact fresh HTML field names and read the attempt before retrying failed writes.

Instructions

Save answers without finishing the attempt. Copy exact field names from fresh question HTML, including :sequencecheck fields and slots. Returns Moodle's attempt state. Never retry a failed write blindly; read the attempt first.

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": {
      "attemptid": "<attemptid>",
      "data": "<data>"
    },
    "name": "moodle_quiz_save_answers"
  }
}

Input Schema

NameRequiredDescriptionDefault
dataYes
siteNo
attemptidYes
preflightdataNoAccess declarations required by Moodle. Enter passwords in the browser, never in chat.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.1

TDQS

A3.8/5.0
Behavior3/5

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

The annotations already declare destructiveHint=true and openWorldHint=true, so the safety profile is partly covered. The description adds real value with the non-idempotent-write warning and the note that it returns Moodle's attempt state, but it never explains what the destruction means — i.e. that previously saved answers for the affected slots are overwritten.

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?

Three short sentences, front-loaded with the action and scope, then the field-name rule, then the return value and retry caveat. No filler and no repetition of schema or annotation content.

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

Completeness3/5

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

For a destructive, open-world write with no output schema, the definition covers the sequencing-check pitfall and retry behavior well, but omits what state is overwritten, whether partial saves are possible, and what must be done if the attempt has expired or been submitted. Those gaps matter given the destructive annotation.

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?

Schema description coverage is only 25% (only preflightdata is documented), so the description must compensate, and it does for the critical 'data' parameter: exact field names copied from fresh question HTML, including :sequencecheck fields and slots. It leaves 'site' and 'attemptid' entirely to the schema, which keeps it below a 5.

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 first sentence gives a concrete verb and resource ('Save answers') plus a scoping qualifier ('without finishing the attempt') that separates it in practice from moodle_quiz_submit_attempt without naming it. It is specific enough to distinguish from sibling tools, though the contrast is implied rather than stated by name.

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 definition gives clear context: use this to persist answers while the attempt stays open, and it adds an operational rule for failure cases ('never retry a failed write blindly; read the attempt first'). It does not explicitly name an alternative tool to call for that read, so the agent must infer moodle_quiz_attempt_data.

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