get-file-data
Fetches wiki files server-side and returns images or text-based original content inline, so sandboxed or network-restricted clients can access files without reaching the wiki host.
Instructions
Fetches a wiki file server-side and returns its content inline, for clients that cannot reach the wiki host (sandboxed or network-restricted). By default returns a scaled rendition sized by width, as an image the model can view: files MediaWiki can rasterize (images, SVG, PDF, DjVu) come back as an image. With format original, returns the contents of a text-based original file, such as SVG, JSON or XML, truncated at 75000 bytes by default. Other types (audio, video, arbitrary binaries) error; for those, and for metadata or a download URL, use get-file.
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": "get-file-data"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| wiki | No | Wiki to target, as a key from the mcp://wikis/ resources (e.g. en.wikipedia.org), or the full mcp://wikis/ URI. Omit to use the default wiki. | |
| title | Yes | File title (with or without the "File:" prefix) | |
| width | No | Pixel width of the scaled rendition, for the image and text formats. A quality/detail knob: in image mode the model caps image tokens regardless of size, so larger mainly means more detail. Defaults to 1024 (512 when format is "text"); values above 1568 are clamped. | |
| format | No | 'image' returns the wiki's rendering of the file as a native image content block the model can view; 'text' returns that rendering's base64 as a text block, for hosts that do not forward image content to the model (base64 text costs far more tokens); 'original' returns the original file's contents as text, for text-based files such as SVG, plain text, JSON or XML. The original file is the upload itself, not its file description page; for that page's wikitext, use get-page. | image |