Skip to main content
Glama

get_assignments

Retrieve assigned tasks from a configured Moodle course to view and manage academic assignments.

Instructions

Obtiene la lista de tareas asignadas en el curso configurado

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that executes the get_assignments tool by calling Moodle's mod_assign_get_assignments web service and returning the list of assignments as JSON.
    private async getAssignments() {
      console.error('[API] Requesting assignments');
      
      const response = await this.axiosInstance.get('', {
        params: {
          wsfunction: 'mod_assign_get_assignments',
          courseids: [MOODLE_COURSE_ID],
        },
      });
    
      const assignments = response.data.courses[0]?.assignments || [];
      
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(assignments, null, 2),
          },
        ],
      };
    }
  • src/index.ts:245-246 (registration)
    Dispatch/registration in the CallToolRequestHandler switch statement that routes calls to the getAssignments handler.
    case 'get_assignments':
      return await this.getAssignments();
  • Tool schema and registration in ListToolsRequestHandler, defining name, description, and empty input schema.
    {
      name: 'get_assignments',
      description: 'Obtiene la lista de tareas asignadas en el curso configurado',
      inputSchema: {
        type: 'object',
        properties: {},
        required: [],
      },
    },
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states it 'obtiene' (gets/retrieves) which implies a read-only operation, but doesn't disclose any behavioral traits like whether it requires authentication, returns paginated results, includes filtering options, or has rate limits. For a tool with zero annotation coverage, this is a significant gap in behavioral context.

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 sentence in Spanish that directly states what the tool does. It's front-loaded with the core action and resource, with no wasted words or unnecessary elaboration. Every part of the sentence contributes to understanding the tool's function.

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 has 0 parameters, no annotations, and no output schema, the description is minimally adequate. It explains what the tool retrieves (assigned tasks in a configured course), but lacks details on behavioral aspects, return format, or differentiation from siblings. For a simple read operation, it meets basic needs but leaves gaps in full context.

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 0 parameters with 100% schema description coverage, so the schema fully documents the lack of parameters. The description doesn't need to add parameter semantics, and it correctly implies no inputs are required by not mentioning any. Baseline for 0 parameters is 4, as the description appropriately focuses on the tool's purpose rather than parameters.

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) and resource ('lista de tareas asignadas' - list of assigned tasks) with context ('en el curso configurado' - in the configured course). It's specific about what it retrieves but doesn't explicitly distinguish from sibling tools like get_submissions or get_quizzes, which might retrieve related but different resources.

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 like get_submissions or get_quizzes. It mentions 'en el curso configurado' which implies a prerequisite context of a configured course, but doesn't specify when this is the appropriate tool for task-related queries versus other sibling tools.

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