Skip to main content
Glama

get_assignments

Retrieve the list of assignments from the configured Moodle course to view all available tasks and their details.

Instructions

Obtiene la lista de tareas asignadas en el curso configurado

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that executes the tool logic: 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 list returned by ListToolsRequestHandler, providing name, description, and input schema.
    { name: 'get_assignments', description: 'Obtiene la lista de tareas asignadas en el curso configurado', inputSchema: { type: 'object', properties: {}, required: [], }, },
  • Defines the input schema for the tool: an empty object with no required properties.
    inputSchema: { type: 'object', properties: {}, required: [], },
  • src/index.ts:245-246 (registration)
    Routes calls to the 'get_assignments' tool to the handler function in the CallToolRequestHandler switch statement.
    case 'get_assignments': return await this.getAssignments();

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