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);
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 clarify if this is a read-only operation, a mutation that updates records, requires specific permissions, has side effects like notifications, or what the response entails. For a tool with four parameters and no annotations, this is a significant gap in transparency.

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, making it easy to understand at a glance, with zero waste.

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 of a tool with four parameters (including a numeric grade and text feedback), no annotations, and no output schema, the description is incomplete. It doesn't explain the tool's behavior, return values, or how it interacts with siblings, leaving significant gaps for an AI agent to understand its full context and usage.

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%, so the schema already documents all four parameters (studentId, assignmentId, grade, feedback) with descriptions. The tool description doesn't add any additional meaning or context 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 action ('Proporciona feedback') and the target resource ('sobre una tarea entregada por un estudiante'), making the purpose understandable. However, it doesn't distinguish this tool from potential siblings like 'get_submissions' or 'get_quiz_grade', which might also involve student work assessment, so it doesn't reach the highest score.

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. With siblings like 'get_submissions' and 'get_quiz_grade' that might retrieve or assess student work, there's no indication of whether this tool is for grading, commenting, or a specific feedback workflow, leaving usage ambiguous.

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

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