Skip to main content
Glama

Baixar arquivo original do Moodle (entrega acessível ao agente)

download_moodle_file
Read-onlyIdempotent

Downloads original Moodle file bytes for submissions, assignment attachments, and course materials using existing integration authentication, without a browser or converting PDFs to text.

Instructions

Baixa os bytes originais preservados de um arquivo do Moodle (submissões individuais ou em grupo, anexos de enunciados e materiais da disciplina) reutilizando a autenticação da integração, sem depender de navegador e sem converter/substituir o PDF por texto. Retorna metadados verificados (fileId, tamanho, MIME, SHA-256, validade), downloadUrl temporária autenticada por token de capacidade e resourceUri MCP.

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": {
      "fileurl": "<fileurl>"
    },
    "name": "download_moodle_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileurlYesURL do arquivo retornada pelas ferramentas do Moodle (pluginfile.php, webservice/pluginfile.php ou draftfile.php).
filenameNoNome opcional do arquivo (preserva espaços/acentos em originalFilename e gera safeFilename sanitizado).
maxBytesNoLimite máximo opcional em bytes para este download.
timeoutMsNoTimeout máximo do download em milissegundos (padrão: 60000).
forceDownloadNoSe true, força novo download do Moodle mesmo se o arquivo ainda estiver válido no cache temporário.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.1

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true and destructiveHint=false, so safety is covered; the description goes beyond them by disclosing that auth is inherited from the integration, that no browser is involved, that bytes are preserved unmodified, and that it returns verified metadata (SHA-256, size, MIME, validity) plus a token-scoped temporary downloadUrl and resourceUri. That is genuinely useful behavioral context. What it omits is failure behavior (expired URLs, size-limit breaches) despite exposing maxBytes/forceDownload.

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?

Two sentences, front-loaded with the action and resource, then the return contract. The parenthetical source list and metadata enumeration are dense but readable and each item carries information; no filler sentences.

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

Completeness4/5

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

There is no output schema, yet the description compensates by naming the return fields (fileId, size, MIME, SHA-256, validity, downloadUrl, resourceUri), which is exactly what an agent needs to chain a download. For a single-required-parameter read tool with full annotation coverage this is close to complete; only the read_moodle_file boundary and error conditions are left unaddressed.

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 every one of the five parameters is already documented in the schema, which sets the baseline at 3. The description adds no parameter-level meaning beyond restating that returned metadata includes size and MIME; it never explains how maxBytes interacts with the returned validity or when forceDownload should be preferred over cache.

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 gives a specific verb plus resource ("Baixa os bytes originais ... de um arquivo do Moodle") and enumerates the supported sources (individual/group submissions, statement attachments, course materials), which is concrete and actionable. It implicitly distances itself from the text-extraction sibling by stating "sem converter/substituir o PDF por texto", but it never names read_moodle_file, so an agent must infer the split from that clause alone.

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

Usage Guidelines3/5

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

Usage is implied rather than stated: the phrase about not converting/substituting PDF for text hints that this tool is for when raw bytes are needed, and "reutilizando a autenticação da integração, sem depender de navegador" tells the agent no separate login step is required. There is no explicit "use this when X, use read_moodle_file when Y" routing, which is the key decision an agent faces given the sibling list.

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