Skip to main content
Glama

mediawiki_upload_file

Destructive

Upload files to a MediaWiki wiki from a URL or local file path, with optional description and overwrite control.

Instructions

Upload a file to the wiki from a URL or local path.

USE WHEN: User says "upload this image", "add file to wiki", "import document".

PARAMETERS:

  • filename: Target filename on wiki (required)

  • file_url: Source URL to fetch file from (one of file_url or file_path required)

  • file_path: Local file path (alternative to file_url)

  • text: File description page content (optional)

  • comment: Upload comment (optional)

  • ignore_warnings: Overwrite existing file (default false)

RETURNS: Upload status and file page URL. Includes revision ID, diff URL, and undo instructions.

NOTE: Requires authentication. URL must be publicly accessible.

SECURITY: Source URL must be on the MEDIAWIKI_UPLOAD_ALLOWED_DOMAINS env-var allowlist (fail-closed when unset). Private/internal IPs are blocked unconditionally. ignore_warnings=true overwrites existing files; the destructive-hint annotation is set so hosts that gate destructive operations will prompt before this runs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rationaleYesRequired one-sentence explanation of why you are making this change. Stored in the audit log for post-hoc intent reconstruction.
filenameYesTarget filename on the wiki (e.g., 'Example.png')
file_pathNoLocal file path to upload
file_urlNoURL to fetch and upload (alternative to file_path)
textNoFile description page content (wikitext)
commentNoUpload comment for the log
ignore_warningsNoIgnore duplicate/overwrite warnings

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
successYes
filenameYes
page_idNo
urlNo
sizeNo
messageYes
warningsNo
Behavior5/5

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

Beyond the destructiveHint and openWorldHint annotations, the description adds critical behavioral context: authentication requirement, URL allowlist security, unconditional blocking of private IPs, and the destructive nature of ignore_warnings=true. It also notes that the annotation gates destructive operations, providing full transparency.

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?

The description is well-structured with labeled sections (USE WHEN, PARAMETERS, RETURNS, NOTE, SECURITY) and front-loaded with the main purpose. It is comprehensive without being verbose, though the PARAMETERS section partially duplicates schema info.

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

Completeness5/5

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

Given the tool's complexity (7 params, security constraints, destructive hint, output schema), the description covers purpose, usage, parameters, return values, authentication, security, and behavioral consequences. The output schema exists, so return details are supportive. No gaps are evident.

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 100%, so baseline is 3. The description adds value by clarifying the mutual exclusivity of file_url and file_path (one required) and stating the default for ignore_warnings (false). It also lists parameters in context, aiding quick comprehension.

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?

The description clearly states 'Upload a file to the wiki from a URL or local path' with a specific verb and resource. It includes a 'USE WHEN' section with concrete user intents like 'upload this image', distinguishing it from sibling tools, none of which perform file uploads.

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 description provides explicit 'USE WHEN' examples and notes authentication requirements and URL allowlist constraints. However, it does not explicitly state when not to use this tool or offer alternatives, but given the uniqueness of the tool among siblings, this is a minor gap.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/olgasafonova/mediawiki-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server