Skip to main content
Glama

get_quizzes

Retrieve available quizzes from a configured Moodle course to access assessment materials and manage learning activities.

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' for the configured course and returns the list of quizzes as a JSON-formatted text response.
    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: [],
      },
    },
  • src/index.ts:247-248 (registration)
    Dispatch case in the CallToolRequest handler that routes 'get_quizzes' calls to the getQuizzes() method.
    case 'get_quizzes':
      return await this.getQuizzes();
  • TypeScript interface defining the structure of Quiz objects returned by the tool.
    interface Quiz {
      id: number;
      name: string;
      timeopen: number;
      timeclose: number;
      grade: number;
      timemodified: number;
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It only states what the tool does ('obtiene la lista') but doesn't describe important behavioral aspects: whether this is a read-only operation, what format the list returns, whether there are pagination limits, authentication requirements, or error conditions. For a tool with zero annotation coverage, this is inadequate.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient Spanish sentence that directly states the tool's purpose with no wasted words. It's appropriately sized for a simple retrieval tool and gets straight to the point without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is incomplete. It doesn't explain what 'curso configurado' means (is this a pre-configured course ID? current context?), what format the quiz list returns, or any limitations. For a tool that presumably returns data, the description should provide more context about the output.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters (schema coverage 100%), so the description doesn't need to explain parameters. The baseline for zero parameters is 4. The description appropriately focuses on the tool's purpose rather than parameter documentation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Obtiene' - gets/retrieves) and the resource ('lista de quizzes en el curso configurado' - list of quizzes in the configured course). It distinguishes itself from siblings like get_assignments or get_quiz_grade by specifying it retrieves quizzes rather than assignments or grades. However, it doesn't specify whether this is a filtered list or complete list, which prevents a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (like needing a configured course), whether it should be used before or after other tools, or how it differs from similar tools like get_assignments. The agent must infer usage from the tool name alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/peancor/moodle-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server