Skip to main content
Glama

attachment_download

Downloads a PKU teaching-site attachment URL to a local destination, reusing identical files instead of overwriting, and returns the local path, SHA-256 hash, and file size.

Instructions

下载一个教学网附件(url 来自其他工具的结果)到 dest 目录,默认 ~/PKU/下载。

不覆盖同名文件,内容相同则复用已有文件。返回本地路径、SHA-256 和大小。

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": {
      "url": "<url>"
    },
    "name": "attachment_download"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYes
destNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.4/5.0
Behavior4/5

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

No annotations exist, so the description carries the full burden, and it does meaningful work: it discloses the default destination (~/PKU/下载), that same-named files are never overwritten, and that identical content reuses the existing file instead of re-downloading. It does not mention auth prerequisites or error behavior, which leaves a small gap for a network-and-filesystem operation.

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

Conciseness5/5

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

Three short clauses, front-loaded with the action and destination, then the dedupe policy, then the return values. No filler and nothing repeated from structured fields.

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?

An output schema exists, so the mention of returned local path, SHA-256, and size is bonus rather than a requirement, and the dedupe/no-overwrite semantics are exactly the side-effect knowledge an agent needs. Missing only peripheral details such as whether the destination directory is created when absent and what happens on download failure.

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?

Schema coverage is 0%, so the description must compensate, and it does: it explains that url comes from another tool's results and that dest is a target directory defaulting to ~/PKU/下载. Both parameters gain meaning beyond bare 'Url' / 'Dest' titles.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb plus resource: download a teaching-site attachment to a destination directory. It also clarifies that the URL originates from another tool's output, which makes the tool's role in a workflow unambiguous against the listing/auth siblings.

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

Usage Guidelines4/5

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

The parenthetical 'url 来自其他工具的结果' tells the agent this is a follow-up step fed by another tool's output, which is real usage context. It stops short of naming a specific sibling or stating when not to use it, so it is clear context without exclusions.

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