Skip to main content
Glama

provide_feedback

Submit assignment feedback and grades for students in Moodle to support learning progress and assessment.

Instructions

Proporciona feedback sobre una tarea entregada por un estudiante

Input Schema

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

Implementation Reference

  • The handler function for the 'provide_feedback' tool. Validates input parameters, calls the Moodle 'mod_assign_save_grade' API to assign grade and feedback, and 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}.`, }, ], }; }
  • Input schema defining the parameters for the 'provide_feedback' tool: studentId, assignmentId (required), grade (optional), feedback (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'], },
  • src/index.ts:173-198 (registration)
    Tool registration in the ListTools response, including name, description, and input schema.
    { 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'], }, },
  • Dispatcher case in CallToolRequestHandler that routes to the provideFeedback method.
    case 'provide_feedback': return await this.provideFeedback(request.params.arguments);

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/cfsandoval/Mcp'

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