/ra-mcp-tools:upload-filesfrom ra-mcp-tools
Uploads local files or attachments to a Gradio server to generate public URLs for tools like htr_transcribe and document viewer. Use when a tool requires HTTP URLs but you have local files.
Ships in ra-mcp-tools. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Upload local files or user-provided attachments (images, XML, etc.) to the
Gradio server so they become publicly accessible URLs. These URLs can then
be passed to tools like htr_transcribe or the document viewer.
If you already have http/https URLs (e.g. IIIF links, public image URLs), skip this skill entirely and pass them directly to the target tool.
The upload target is the Gradio Space that backs the HTR MCP server:
https://riksarkivet-htr-demo.hf.space
Override with the HTR_SPACE_URL environment variable if set.
If the user attached files in the conversation (not already on disk), save them first. Claude attachments are available as content in the conversation — write them to temporary files.
For each file, POST to the Gradio upload endpoint:
curl -s -X POST "https://riksarkivet-htr-demo.hf.space/gradio_api/upload" \
-F "files=@/path/to/filename.jpg"
Response is a JSON array of server paths:
["/tmp/gradio/abc123def/filename.jpg"]
For each server path returned, construct the public URL:
https://riksarkivet-htr-demo.hf.space/gradio_api/file=/tmp/gradio/abc123def/filename.jpg
Pattern: {base_url}/gradio_api/file={server_path}
Gather all constructed URLs before passing them to the target tool. Present the URLs to the user so they can verify the uploads succeeded.
You can upload multiple files in a single request:
curl -s -X POST "https://riksarkivet-htr-demo.hf.space/gradio_api/upload" \
-F "[email protected]" \
-F "[email protected]" \
-F "[email protected]"
Response:
[
"/tmp/gradio/abc123/page1.jpg",
"/tmp/gradio/abc123/page2.jpg",
"/tmp/gradio/abc123/page3.jpg"
]
Prefer batch upload over individual uploads when possible.
| Type | Extensions | Use with |
|---|---|---|
| Images | .jpg, .jpeg, .png, .tif, .tiff | htr_transcribe, document viewer |
| ALTO XML | .xml | document viewer (text layer overlay) |
| PAGE XML | .xml | document viewer (text layer overlay) |
Once you have public URLs, pass them to the appropriate tool:
htr_transcribe with image_urls=[...]view_document with image_urls=[...] and optionally text_layer_urls=[...]What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
8 skills in this plugin
/archival-guideWhich Swedish records exist and where — maps a research topic to the right Förvaltningshistorik chapter (served as MCP resources), so you know what record type answers a question and which authority created it. Use when the user asks where to find records about something, what a record type is, or about court, church, tax, military, or population records (folkbokföring, bouppteckning, dombok, husförhörslängd, mantalslängd).
/archive-researchHow to browse, cite, and present archival findings — load AFTER search, when reading documents or reporting results. Covers research-integrity rules (never fabricate reference codes, always cite the exact page), old-Swedish translation, and the browse→synthesize workflow. Use when the user wants to browse or read pages, examine or interpret a document, translate old Swedish, or have findings cited and presented.
/archive-searchHow to query the Riksarkivet search tools — load BEFORE calling search_transcribed or search_metadata. Picks the right tool and builds queries with the fuzzy, wildcard, and old-Swedish-spelling tactics that AI transcription errors demand. Use when the user wants to search, find, or look up documents, people, places, or events in the Swedish National Archives (Riksarkivet) — including terms like trolldom, häxprocess, bouppteckning, or dombok.
/feedback-lsSend document pages to Label Studio for human review — pre-annotated tasks from ALTO XML, or blank image-only tasks to annotate from scratch. Use when the user wants human review, correction, or quality assurance of transcriptions or line/region segmentation, or wants to build annotation tasks from browse results.
/htr-transcriptionTranscribe handwritten historical documents with the HTRflow MCP tools — batch images into one htr_transcribe call and present the interactive viewer. Use when the user wants to transcribe or OCR handwriting, read old handwriting, or digitize a manuscript.
/pdf-guideSearches and reads Riksarkivet's archival PDF guides (medieval Sweden, governance 1520-1920, Sami history). Use when user asks about Swedish history, archives, medieval charters, governance, Sami, or wants to open/search PDF guides. Provides section-level references with page numbers for citation.npx claudepluginhub ai-riksarkivet/ra-mcp --plugin ra-mcp-toolsOther plugins' skills for the same job