Skip to main content
Glama

submit_assignment

Destructive

Prepare a Moodle assignment submission for local human approval, then execute that exact approved save-draft or final-submit action once.

Instructions

Flujo por etapas: prepare inspecciona el formulario y crea una operación local pendiente; una persona debe revisarla y aprobarla en una terminal local interactiva con npm run approve:assignment -- <id>. execute solo usa esa aprobación exacta, de un uso y con vencimiento. La ejecución está deshabilitada por política local hasta habilitación explícita.

Input Schema

NameRequiredDescriptionDefault
stageNoprepare inspecciona el formulario y crea una operación pendiente; execute requiere approval_id aprobado localmente.prepare
confirmNoCompatibilidad con clientes antiguos: debe ser false. true se rechaza y nunca autoriza una escritura.
approval_idNoIdentificador de una operación aprobada desde la terminal local. Solo para stage=execute.
text_contentNoTexto exacto de entrega en línea, si la tarea ofrece ese campo.
assignment_idYesID numérico de la tarea (mod/assign/view.php?id=...)
attachment_pathsNoRutas locales de archivos que el proceso MCP local puede leer. Máximo 10 archivos.
submission_actionNoEfecto solicitado. Si se omite, prepara save_draft. submit_final realiza además el envío formal, si Moodle lo permite.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only say destructive=true and idempotent=false; the description adds substantially more: a two-phase human-in-the-loop gate, an external approval minted out-of-band via `npm run approve:assignment -- <id>`, single-use semantics, approval expiry, and an execution kill-switch by local policy. These are exactly the operational constraints an agent could not derive from the annotations.

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?

Three dense sentences, front-loaded with the staged model, then the human approval step, then the policy gate. Each sentence carries required information. Minor friction from heavy clause stacking ('esa aprobación exacta, de un uso y con vencimiento') and from not naming the resource explicitly.

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 destructive, open-world write with 7 parameters and no output schema, the description covers the safety-critical path thoroughly: gating, approval provenance, single use, expiry, and disabled-by-default. The remaining gap is return behavior, since there is no output schema and the description never says what prepare hands back (implicitly an <id> the human must quote) or what execute reports on success/failure.

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 coverage is 100%, so the baseline is 3, and the schema already documents stage, approval_id, confirm and submission_action. The description still adds meaning by characterizing approval_id as exact-match, single-use and time-limited, a constraint absent from the parameter's own description and decisive for how the agent should treat the ID. It says nothing about assignment_id, text_content or attachment_paths, but the schema covers those.

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 names both stages and their concrete actions ('prepare inspecciona el formulario y crea una operación local pendiente'; 'execute solo usa esa aprobación'), so an agent knows this is the scripted submission flow rather than a plain write. However, it never states plainly that the tool submits assignment content/files to Moodle, and it makes no explicit contrast with mutating siblings like submit_choice or forum_reply.

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

Usage Guidelines5/5

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

It gives explicit routing conditions: use prepare to inspect the form and create a pending operation, use execute only with an approval produced by the human-run CLI command. It also states a hard when-not: 'La ejecución está deshabilitada por política local hasta habilitación explícita.' Nothing about stage selection is left to inference.

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