Skip to main content
Glama

mediawiki_upload_file

Upload files from URLs to MediaWiki wikis, enabling users to add images, documents, and other media with customizable descriptions and overwrite options.

Instructions

Upload a file to the wiki from a URL.

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 (required)

  • text: File description page content (optional)

  • comment: Upload comment (optional)

  • ignore_warnings: Overwrite existing file (default false)

RETURNS: Upload status and file page URL.

NOTE: Requires authentication. URL must be publicly accessible.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
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
urlNo
sizeNo
messageYes
page_idNo
successYes
filenameYes
warningsNo
Behavior4/5

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

The description adds valuable behavioral context beyond the annotations (which only provide title and openWorldHint). It discloses authentication requirements, URL accessibility constraints, overwrite behavior via ignore_warnings, and return format details. However, it doesn't mention rate limits or specific error conditions that might be relevant for a file upload 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?

The description is well-structured with clear sections (purpose, usage guidelines, parameters, returns, notes) and every sentence adds value. It's appropriately sized for a 6-parameter tool with authentication requirements, with no redundant or unnecessary information.

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 (file upload with authentication), the description provides complete context: clear purpose, usage scenarios, parameter overview, return information, and important notes about authentication and URL accessibility. With both comprehensive schema coverage and an output schema, the description focuses appropriately on operational context rather than repeating structured data.

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?

With 100% schema description coverage, the schema already documents all parameters thoroughly. The description adds minimal extra semantics - it clarifies that ignore_warnings enables overwriting existing files and notes which parameters are required/optional, but doesn't provide significant additional meaning beyond what's in the schema descriptions.

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 the specific action ('Upload a file to the wiki from a URL') and distinguishes it from sibling tools like mediawiki_edit_page or mediawiki_get_images by focusing on file upload functionality. It specifies both the source (URL) and destination (wiki), making the purpose unambiguous.

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

Usage Guidelines5/5

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

The 'USE WHEN' section explicitly lists scenarios when to use this tool ('upload this image', 'add file to wiki', 'import document'), providing clear guidance for an AI agent. It also mentions authentication requirements and URL accessibility, which are practical usage considerations.

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

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