Skip to main content
Glama

下载课程附件

lexue_download_attachment

Downloads an attachment for a specified course item (assignment, courseware, or announcement) into an existing local directory while preserving files with the same name.

Instructions

把指定条目的附件下载到已存在的本地目录。保留同名的本地文件。

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": {
      "courseId": "<courseId>",
      "title": "<title>",
      "section": "<section>",
      "fileName": "<fileName>",
      "directory": "<directory>"
    },
    "name": "lexue_download_attachment"
  }
}

Input Schema

NameRequiredDescriptionDefault
titleYes
sectionYes
courseIdYes新乐学课程编号,例如 lexue_list_courses 返回的 courseId
fileNameYes
directoryYes用户已指定的本地绝对路径

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.1/5.0
Behavior3/5

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

The description adds real context beyond the annotations: the target directory must already exist, and same-named local files are handled in some way ("保留同名的本地文件"). However, that phrase does not clearly say whether it overwrites or skips, and with openWorldHint=true / idempotentHint=false and no output schema, the description says nothing about what is returned or what happens on failure.

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 short sentences, front-loaded with the action and destination, with no filler. The second sentence is terse to the point of ambiguity, but it occupies only a few characters and does carry behavioral information.

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

Completeness2/5

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

For a five-required-parameter write tool with no output schema, the definition omits too much: where `title`/`section` values come from, where the file lands and under what filename, and what the call returns. Only the directory precondition is covered.

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

Parameters2/5

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

Schema coverage is only 40% across five required parameters, so the description carries heavy burden, yet it only elaborates on `directory` (must pre-exist). It never explains how `courseId` + `section` + `title` combine to locate the entry, nor whether `fileName` is the remote name used for naming the saved file.

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 (下载) and resource (附件) plus the destination scope, so the agent can tell it performs a file download rather than the CRUD operations its siblings perform. No sibling in the catalog also downloads attachments, so no textual differentiation is strictly needed.

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: "指定条目" signals that the entry must already be known (presumably from the list_* tools) and "已存在的本地目录" implies the directory is a precondition. There is no explicit when-to-use, when-not-to-use, or mention of what to do if the entry or file is missing.

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