Skip to main content
Glama

get_quizzes

Retrieve the list of quizzes available in the configured Moodle course to access assessment materials and track learning progress.

Instructions

Obtiene la lista de quizzes en el curso configurado

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core handler function for the 'get_quizzes' tool. It makes an API call to Moodle's 'mod_quiz_get_quizzes_by_courses' web service for the configured course ID, extracts the quizzes array from the response, and returns it as a JSON-formatted text content block.
    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, including 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: [], }, },
  • Input schema for the 'get_quizzes' tool, which is an empty object (no input parameters expected).
    inputSchema: { type: 'object', properties: {}, required: [], },
  • src/index.ts:247-248 (registration)
    Dispatch case in the CallToolRequestHandler switch statement that routes calls to the getQuizzes() handler method.
    case 'get_quizzes': return await this.getQuizzes();
  • TypeScript interface defining the expected structure of a Quiz object, matching the Moodle API response fields.
    interface Quiz { id: number; name: string; timeopen: number; timeclose: number; grade: number; timemodified: number; }

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