Skip to main content
Glama

provide_feedback

Submit feedback and grades for student assignments on Moodle. Enter student ID, assignment ID, grade, and feedback text to evaluate and guide performance effectively.

Instructions

Proporciona feedback sobre una tarea entregada por un estudiante

Input Schema

NameRequiredDescriptionDefault
assignmentIdYesID de la tarea
feedbackYesTexto del feedback a proporcionar
gradeNoCalificación numérica a asignar
studentIdYesID del estudiante

Input Schema (JSON Schema)

{ "properties": { "assignmentId": { "description": "ID de la tarea", "type": "number" }, "feedback": { "description": "Texto del feedback a proporcionar", "type": "string" }, "grade": { "description": "Calificación numérica a asignar", "type": "number" }, "studentId": { "description": "ID del estudiante", "type": "number" } }, "required": [ "studentId", "assignmentId", "feedback" ], "type": "object" }

Implementation Reference

  • The core handler function for the 'provide_feedback' tool. It validates the input parameters (studentId, assignmentId, feedback) and calls the Moodle Web Service 'mod_assign_save_grade' to assign a grade and feedback comment to a student's assignment submission. Returns a success message.
    private async provideFeedback(args: any) { if (!args.studentId || !args.assignmentId || !args.feedback) { throw new McpError( ErrorCode.InvalidParams, 'Student ID, Assignment ID, and feedback are required' ); } console.error(`[API] Providing feedback for student ${args.studentId} on assignment ${args.assignmentId}`); const response = await this.axiosInstance.get('', { params: { wsfunction: 'mod_assign_save_grade', assignmentid: args.assignmentId, userid: args.studentId, grade: args.grade || 0, attemptnumber: -1, // Último intento addattempt: 0, workflowstate: 'released', applytoall: 0, plugindata: { assignfeedbackcomments_editor: { text: args.feedback, format: 1, // Formato HTML }, }, }, }); return { content: [ { type: 'text', text: `Feedback proporcionado correctamente para el estudiante ${args.studentId} en la tarea ${args.assignmentId}.`, }, ], }; }
  • src/index.ts:173-198 (registration)
    Tool registration in the ListToolsRequestHandler response. Defines the tool name, description, and input schema specifying required parameters: studentId, assignmentId, feedback (grade optional).
    { name: 'provide_feedback', description: 'Proporciona feedback sobre una tarea entregada por un estudiante', inputSchema: { type: 'object', properties: { studentId: { type: 'number', description: 'ID del estudiante', }, assignmentId: { type: 'number', description: 'ID de la tarea', }, grade: { type: 'number', description: 'Calificación numérica a asignar', }, feedback: { type: 'string', description: 'Texto del feedback a proporcionar', }, }, required: ['studentId', 'assignmentId', 'feedback'], }, },
  • Input schema definition for the provide_feedback tool, defining types and descriptions for parameters and marking studentId, assignmentId, feedback as required.
    inputSchema: { type: 'object', properties: { studentId: { type: 'number', description: 'ID del estudiante', }, assignmentId: { type: 'number', description: 'ID de la tarea', }, grade: { type: 'number', description: 'Calificación numérica a asignar', }, feedback: { type: 'string', description: 'Texto del feedback a proporcionar', }, }, required: ['studentId', 'assignmentId', 'feedback'], },
  • Dispatcher in the CallToolRequestHandler switch statement that invokes the provideFeedback handler with the tool arguments.
    case 'provide_feedback': return await this.provideFeedback(request.params.arguments);

Other Tools

Related 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/peancor/moodle-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server