Skip to main content
Glama
Wikimedia Commons MCP Server

Wikimedia Commons MCP Server

by irfandemir00

Download Wikimedia Commons File

download_file

Download a Wikimedia Commons original file or resized thumbnail into the configured sandbox directory, with path-traversal protection, size limits, and SHA-1 integrity checks for originals.

Instructions

Safely download an original Wikimedia Commons file or resized thumbnail into the configured sandbox download directory (COMMONS_DOWNLOAD_DIR). Enforces path traversal protection, size limits, and SHA-1 integrity verification for original files.

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": {
      "title": "<title>"
    },
    "name": "download_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
titleYesCommons file title (with or without File: prefix)
widthNoOptional thumbnail width in pixels; omit to download the original full-resolution file
filenameNoOptional single-segment filename override (without directory separators)
overwriteNoWhether to overwrite an existing file at the resolved target path (default false)
subdirectoryNoOptional relative subdirectory inside the configured download root

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already flag a write operation (readOnlyHint=false) and open-world access. The description adds real value beyond them: sandboxed destination, path traversal protection, size limits, and SHA-1 integrity verification for originals.

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?

Two dense sentences, zero filler, and the destination and safety guarantees are front-loaded after the core action.

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?

Covers purpose, destination, and safety behavior thoroughly, which is the key complexity for a download tool. With no output schema, it does not describe the return value (e.g., saved path or verification result), which is a minor 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 coverage is 100%, so all five params are already documented in the schema. The description only restates the original-vs-thumbnail choice; it adds no syntax or behavioral nuance (e.g., how filename/subdirectory interact with traversal protection).

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 (download) and resource (original Wikimedia Commons file or resized thumbnail) plus the destination (sandbox download directory). It is clearly distinguishable from read-only siblings like get_file_details and preview_image, though it never names an alternative explicitly.

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?

The description implies usage via 'original file or resized thumbnail' and the width param semantics, but gives no explicit when-to-use / when-not-to-use guidance or named alternatives. Guidance must be inferred rather than read.

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