Skip to main content
Glama

provide_feedback

Submit feedback and grades for student assignments in Moodle. Enter student ID, assignment ID, grade, and feedback text to evaluate submissions.

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 provideFeedback function implements the core logic of the 'provide_feedback' tool. It validates input parameters, calls the Moodle API 'mod_assign_save_grade' to save the grade and feedback comment, 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 for the 'provide_feedback' tool defining properties for studentId, assignmentId, grade (optional), and feedback (required), with required fields specified.
    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 inputSchema for 'provide_feedback'.
    {
      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'],
      },
    },
  • Dispatch case in the CallToolRequestSchema handler that routes 'provide_feedback' calls to the provideFeedback method.
    case 'provide_feedback':
      return await this.provideFeedback(request.params.arguments);
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the action ('Proporciona feedback') but doesn't describe what this entails: whether it creates new feedback, updates existing feedback, requires specific permissions, has side effects (e.g., notifying the student), or what the response looks like. For a mutation tool with zero annotation coverage, this is a significant gap.

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?

The description is a single, efficient sentence in Spanish that directly states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded, with every part contributing to understanding the action and target.

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

Completeness2/5

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

Given the complexity (a mutation tool for providing feedback with grades), lack of annotations, and no output schema, the description is incomplete. It doesn't address behavioral aspects like permissions, side effects, or response format, leaving gaps for an AI agent to correctly invoke the tool in context with siblings.

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 description coverage is 100%, with all parameters clearly documented in the input schema (studentId, assignmentId, grade, feedback). The description adds no additional meaning beyond what the schema provides, such as explaining relationships between parameters or usage examples. Baseline 3 is appropriate when the schema does the heavy lifting.

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 clearly states the verb 'Proporciona' (provides) and the resource 'feedback sobre una tarea entregada por un estudiante' (feedback on a task submitted by a student), making the purpose specific and understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_submissions' or 'get_quiz_grade', which are read-only operations, while this appears to be a write operation.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing to check submission status first), exclusions (e.g., not for unsubmitted tasks), or comparisons to siblings like 'get_quiz_grade' (which might retrieve grades). Usage is implied but not explicitly stated.

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

Install Server

Other 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