Skip to main content
Glama

get_students

Retrieve enrolled student lists from configured Moodle courses to manage class rosters and track participation.

Instructions

Obtiene la lista de estudiantes inscritos en el curso configurado

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that implements the 'get_students' tool. It queries the Moodle API with core_enrol_get_enrolled_users, filters users with 'student' role, maps to Student fields, and returns JSON stringified list.
    private async getStudents() {
      console.error('[API] Requesting enrolled users');
      
      const response = await this.axiosInstance.get('', {
        params: {
          wsfunction: 'core_enrol_get_enrolled_users',
          courseid: MOODLE_COURSE_ID,
        },
      });
    
      const students = response.data
        .filter((user: any) => user.roles.some((role: any) => role.shortname === 'student'))
        .map((student: any) => ({
          id: student.id,
          username: student.username,
          firstname: student.firstname,
          lastname: student.lastname,
          email: student.email,
        }));
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(students, null, 2),
          },
        ],
      };
    }
  • src/index.ts:129-136 (registration)
    Registration of the 'get_students' tool in the ListToolsRequestSchema handler, including name, description, and input schema.
      name: 'get_students',
      description: 'Obtiene la lista de estudiantes inscritos en el curso configurado',
      inputSchema: {
        type: 'object',
        properties: {},
        required: [],
      },
    },
  • Input schema for 'get_students' tool: an empty object with no required properties.
    inputSchema: {
      type: 'object',
      properties: {},
      required: [],
    },
  • src/index.ts:243-244 (registration)
    Dispatch/registration of 'get_students' tool call in the switch statement of CallToolRequestSchema handler.
    case 'get_students':
      return await this.getStudents();
  • TypeScript interface defining the Student data structure used in the getStudents handler output.
    interface Student {
      id: number;
      username: string;
      firstname: string;
      lastname: string;
      email: string;
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. The description only states what the tool does ('obtiene la lista'), without detailing behavioral traits such as whether it requires authentication, has rate limits, returns paginated results, or handles errors. For a read operation with zero annotation coverage, this is a significant gap in transparency.

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

Conciseness4/5

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

The description is a single, clear sentence: 'Obtiene la lista de estudiantes inscritos en el curso configurado'. It is front-loaded with the main purpose and has no unnecessary words. However, it could be slightly more concise by omitting 'configurado' if implied, but overall it is efficient and well-structured.

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

Completeness3/5

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

Given the tool's simplicity (0 parameters, no output schema, no annotations), the description is minimally complete. It states the basic purpose but lacks details on behavior, usage context, or output format. For a read-only list tool with no structured data support, this is adequate but leaves clear gaps, such as not explaining what the returned list contains or how it's formatted.

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 input schema has 0 parameters with 100% coverage, meaning no parameters are documented in the schema. The description does not mention any parameters, which is appropriate here. Since there are no parameters, the baseline score is 4, as the description does not need to compensate for missing parameter info.

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 tool's purpose: 'Obtiene la lista de estudiantes inscritos en el curso configurado' (Gets the list of students enrolled in the configured course). It specifies the verb 'obtiene' (gets) and the resource 'estudiantes inscritos en el curso configurado' (students enrolled in the configured course). However, it does not explicitly differentiate from sibling tools like 'get_assignments' or 'get_submissions', which lowers the score from a 5.

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 does not mention any context, prerequisites, or exclusions. For example, it does not clarify if this is for retrieving all students versus filtered subsets, or how it relates to sibling tools like 'get_submissions' that might involve student data. This lack of usage guidance results in a low score.

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/cfsandoval/Mcp'

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