Skip to main content
Glama

get_quizzes

Retrieve the list of quizzes from a configured Moodle course to manage assessments and track student progress.

Instructions

Obtiene la lista de quizzes en el curso configurado

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the 'get_quizzes' tool. It calls the Moodle Web Service 'mod_quiz_get_quizzes_by_courses' to fetch quizzes for the configured course and returns them as JSON string.
    private async getQuizzes() { console.error('[API] Requesting quizzes'); const response = await this.axiosInstance.get('', { params: { wsfunction: 'mod_quiz_get_quizzes_by_courses', courseids: [MOODLE_COURSE_ID], }, }); const quizzes = response.data.quizzes || []; return { content: [ { type: 'text', text: JSON.stringify(quizzes, null, 2), }, ], }; }
  • src/index.ts:146-154 (registration)
    Tool registration in the ListTools response, defining name, description, and empty input schema (no parameters required).
    { name: 'get_quizzes', description: 'Obtiene la lista de quizzes en el curso configurado', inputSchema: { type: 'object', properties: {}, required: [], }, },
  • TypeScript interface defining the structure of a Quiz object, used in the context of quiz data.
    interface Quiz { id: number; name: string; timeopen: number; timeclose: number; grade: number; timemodified: number; }
  • src/index.ts:247-248 (registration)
    Dispatcher in CallToolRequest handler that routes 'get_quizzes' calls to the getQuizzes() method.
    case 'get_quizzes': return await this.getQuizzes();
  • Input schema for the get_quizzes tool, specifying no required parameters.
    inputSchema: { type: 'object', properties: {}, required: [], },

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