get_quizzes
Retrieve the list of quizzes from a configured course using the Moodle MCP Server, enabling efficient course management through automated data access.
Instructions
Obtiene la lista de quizzes en el curso configurado
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Input Schema (JSON Schema)
{
"properties": {},
"required": [],
"type": "object"
}
Implementation Reference
- src/index.ts:335-355 (handler)The handler function that executes the get_quizzes tool logic, fetching quizzes via Moodle Web Service mod_quiz_get_quizzes_by_courses and returning JSON-formatted list.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:147-154 (registration)Tool registration in ListToolsRequestHandler response, including name, description, and input schema (empty object, no params required).name: 'get_quizzes', description: 'Obtiene la lista de quizzes en el curso configurado', inputSchema: { type: 'object', properties: {}, required: [], }, },
- src/index.ts:247-248 (registration)Dispatcher in CallToolRequestHandler switch statement that calls the getQuizzes handler for the 'get_quizzes' tool.case 'get_quizzes': return await this.getQuizzes();
- src/index.ts:149-153 (schema)Input schema definition for the get_quizzes tool: accepts an empty object with no required properties.inputSchema: { type: 'object', properties: {}, required: [], },