get_assignments
Retrieve assigned tasks from a configured Moodle course to view and manage academic assignments.
Instructions
Obtiene la lista de tareas asignadas en el curso configurado
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:313-333 (handler)The handler function that executes the get_assignments tool by calling Moodle's mod_assign_get_assignments web service and returning the list of assignments as JSON.private async getAssignments() { console.error('[API] Requesting assignments'); const response = await this.axiosInstance.get('', { params: { wsfunction: 'mod_assign_get_assignments', courseids: [MOODLE_COURSE_ID], }, }); const assignments = response.data.courses[0]?.assignments || []; return { content: [ { type: 'text', text: JSON.stringify(assignments, null, 2), }, ], }; }
- src/index.ts:245-246 (registration)Dispatch/registration in the CallToolRequestHandler switch statement that routes calls to the getAssignments handler.case 'get_assignments': return await this.getAssignments();
- src/index.ts:137-145 (schema)Tool schema and registration in ListToolsRequestHandler, defining name, description, and empty input schema.{ name: 'get_assignments', description: 'Obtiene la lista de tareas asignadas en el curso configurado', inputSchema: { type: 'object', properties: {}, required: [], }, },