Skip to main content
Glama

Ler conteúdo completo da entrega de um aluno ou grupo (com OCR automático opcional, layout visual e separação de comentários)

get_submission_content
Read-onlyIdempotent

Retrieves full individual or group submission details, resolves the effective group, deduplicates files, extracts text with optional OCR, and separates submission vs grading comments.

Instructions

Obtém os detalhes completos da entrega individual e/ou coletiva em grupo (teamsubmission / userid=0) em uma tarefa, resolvendo deterministicamente o grupo efetivo da tarefa (excluindo grupos gerais de turma como INE5458-08208), deduplicando arquivos por fileKey, suportando OCR automático local (ocrMode="auto"|"force"|"status") com blocos visuais posicionados e separando explicitamente submissionComments (comentários da entrega) de gradingFeedbackComments (comentários da avaliação).

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": {
      "assignmentId": "<assignmentId>"
    },
    "name": "get_submission_content"
  }
}

Input Schema

NameRequiredDescriptionDefault
groupIdNoID do grupo de projeto da tarefa (assignmentGroupId) para consultar diretamente uma entrega coletiva (mesmo quando userid=0 em get_submissions).
ocrModeNoModo de OCR local no servidor: "off" (padrão compatível, apenas camada nativa), "auto" (tenta nativo e executa OCR local Poppler+Tesseract apenas nas páginas de imagem/sem texto), "force" (força OCR em todas as páginas até maxOcrPages) ou "status" (diagnostica necessidade e disponibilidade de OCR sem executá-lo).
courseIdNoID opcional da disciplina (resolvido automaticamente caso omitido).
studentIdNoID do aluno (userid) no Moodle. Em tarefas em grupo, resolve deterministicamente o grupo efetivo do projeto na tarefa.
maxOcrPagesNoLimite máximo de páginas processadas via OCR por arquivo (padrão: 30).
assignmentIdYesID da tarefa (assignmentId).
extractFilesNoSe true (padrão), baixa os arquivos para o armazenamento temporário isolado (gerando downloadUrl e sha256) e executa extração textual (e OCR quando ocrMode="auto"|"force").
ocrLanguagesNoIdiomas do Tesseract para OCR (padrão: ["eng", "por"]).
ocrTimeoutMsNoTimeout máximo global em ms para o processamento OCR de cada arquivo (padrão proporcional: 120000).
maxCharsPerFileNoLimite máximo de caracteres extraídos por arquivo (padrão: 45000).
ocrPageTimeoutMsNoTimeout individual por página em ms para o processamento OCR local (padrão: 60000).
includePersonalDataNoSe true, inclui e-mail institucional dos estudantes nos metadados (padrão: false).
includeMemberEvaluationsNoSe true (padrão), inclui o detalhamento individual das avaliações de todos os integrantes do grupo.
includeSubmissionCommentsNoSe true (padrão), consulta também comentários associados à entrega (assignsubmission_comments), separados de gradingFeedbackComments.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.1

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description adds real behavioral context beyond them: deterministic effective-group resolution that excludes class-wide groups (named example INE5458-08208), file deduplication by fileKey, and explicit separation of submissionComments from gradingFeedbackComments in the response. It omits side effects like the temp-storage download and any permission requirements, which keeps it from a 5.

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

Conciseness3/5

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

It is front-loaded with the core action, but the whole definition is one long run-on sentence packed with parentheticals covering group resolution, dedup, OCR and comments. Nothing is wasted, yet readability suffers because distinct concerns are not separated into 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?

For a 14-parameter tool with no output schema, the description gives enough shape to the return value (visual OCR blocks, deduped files, separate comment fields) and explains the trickiest domain logic. It does not describe the overall response structure or what happens when no submission exists, which is the main remaining gap.

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 the schema already explains every parameter and its defaults. The description reinforces only ocrMode ("auto"|"force"|"status") and the comment-splitting behavior, adding marginal meaning over the structured fields; baseline 3 applies.

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 specific verb+resource ("Obtém os detalhes completos da entrega") and scopes it to individual and/or group submissions (teamsubmission / userid=0). It clearly distinguishes itself from a plain listing tool by promising full content, dedup and OCR, though it never names the sibling get_submissions as the alternative for lighter lookups.

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 only implied: an agent can infer this is the tool for deep content extraction when a list view is insufficient, and the ocrMode enum hints at the auto/force/status choices. There is no explicit when-to-use / when-not-to-use statement or reference to sibling tools such as get_submissions or download_moodle_file.

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