Skip to main content
Glama

get_assignments

Retrieve assignment lists from Moodle courses to track tasks and manage academic workload.

Instructions

Obtiene la lista de tareas asignadas en el curso configurado

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the 'get_assignments' tool. It calls Moodle's 'mod_assign_get_assignments' web service to fetch assignments for the configured course and returns them as JSON-formatted text.
    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:137-145 (registration)
    Registers the 'get_assignments' tool in the ListTools response, including its name, description, and input schema (empty object, no parameters required).
    {
      name: 'get_assignments',
      description: 'Obtiene la lista de tareas asignadas en el curso configurado',
      inputSchema: {
        type: 'object',
        properties: {},
        required: [],
      },
    },
  • src/index.ts:245-246 (registration)
    Dispatcher case in the CallToolRequest handler that routes calls to the 'get_assignments' tool to its implementation method.
    case 'get_assignments':
      return await this.getAssignments();
  • Defines the input schema for the 'get_assignments' tool: an empty object with no required properties.
    inputSchema: {
      type: 'object',
      properties: {},
      required: [],
    },
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states this is a read operation ('obtiene' = 'gets'), but doesn't describe what 'configured course' means, whether this requires authentication, what format the list returns, or any limitations like pagination or rate limits. For a tool with zero annotation coverage, this leaves significant behavioral gaps.

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, efficient sentence in Spanish that directly states the tool's purpose. It's appropriately sized for a simple list-retrieval tool with no parameters. While front-loaded, it could potentially benefit from slightly more structure if behavioral details were needed.

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 (zero parameters, no output schema, no annotations), the description is minimally adequate but has clear gaps. It explains what the tool does but doesn't provide enough context about the 'configured course' prerequisite, return format, or how this differs from similar sibling tools. For a read-only list tool, it meets basic requirements but lacks completeness.

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 with 100% schema description coverage, so the schema already fully documents the parameter situation. The description appropriately doesn't add parameter information beyond what's in the schema, which is correct for a zero-parameter tool. Baseline for zero parameters is 4.

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 la lista de' = 'gets the list of') and resource ('tareas asignadas en el curso configurado' = 'assigned tasks in the configured course'), providing a specific verb+resource combination. It doesn't explicitly differentiate from sibling tools like get_quizzes or get_submissions, but the resource specificity ('assigned tasks') provides some implicit distinction.

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_quizzes or get_submissions. It mentions 'in the configured course' which implies a prerequisite course configuration, but offers no explicit when/when-not instructions or comparison with 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/cfsandoval/Mcp'

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