Skip to main content
Glama

Enviar mensagem direta no Moodle

send_message

Sends a direct instant Moodle message to a student or user by recipient ID and text, enabling targeted communication within UFSC Moodle.

Instructions

Envia uma mensagem instantânea direta pelo Moodle para um aluno ou usuário (core_message_send_instant_messages).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "toUserId": "<toUserId>",
      "text": "<text>"
    },
    "name": "send_message"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYesTexto da mensagem a ser enviada.
toUserIdYesID do usuário destinatário no Moodle (use get_students para descobrir).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.1

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false, idempotentHint=false, and openWorldHint=false, so the write-but-not-destructive profile is covered. The description adds that delivery is an instant direct message inside Moodle, but says nothing about permissions, whether the message can be recalled, notification behavior, or delivery failure modes. With annotations carrying the safety profile, this is adequate but thin.

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?

A single front-loaded sentence with zero filler; the action and target are stated in the first few words. The parenthetical API function name is slightly technical clutter, but it is short and does not dilute the core statement.

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?

With only two required parameters, a fully described schema, and annotations, the essentials are in place. However, for an outward-facing send tool, the description omits any note on recipient eligibility, permission requirements, or what happens on failure, which an agent would need to call it reliably in edge cases.

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

Parameters3/5

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

Schema description coverage is 100%, so both parameters are documented in the schema, including the get_students hint for toUserId. The description adds only that the recipient is a student or user and that the payload is an instant message, which is marginal extra meaning. Baseline 3 applies when the schema does the heavy lifting.

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?

States a concrete verb and resource: 'Envia uma mensagem instantânea direta pelo Moodle', plus the underlying web-service function core_message_send_instant_messages. It is clearly a write/send operation and clearly distinct from the read-side sibling get_messages, although it never names that sibling explicitly.

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 gives no when-to-use or when-not-to-use guidance and names no alternative (e.g., post_forum_discussion for public course communication, get_messages for reading replies). The only routing hint, 'use get_students to discover' the recipient ID, lives in the schema property, not the description.

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