get_assignments
Retrieve assignment lists from Moodle courses to track tasks and manage academic workload.
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 main handler function for the 'get_assignments' tool. It calls Moodle's 'mod_assign_get_assignments' web service to fetch assignments for the configured course and returns them as JSON-formatted text.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:137-145 (registration)Registers the 'get_assignments' tool in the ListTools response, including its name, description, and input schema (empty object, no parameters required).{ name: 'get_assignments', description: 'Obtiene la lista de tareas asignadas en el curso configurado', inputSchema: { type: 'object', properties: {}, required: [], }, },
- src/index.ts:245-246 (registration)Dispatcher case in the CallToolRequest handler that routes calls to the 'get_assignments' tool to its implementation method.case 'get_assignments': return await this.getAssignments();
- src/index.ts:140-144 (schema)Defines the input schema for the 'get_assignments' tool: an empty object with no required properties.inputSchema: { type: 'object', properties: {}, required: [], },