jira_construct_upload_endpoint
Get upload URL and session token to upload local files, enabling attachment uploads to Jira via a two-step client-side flow.
Instructions
Return the URL and session token needed to upload local files to the MCP server.
This is step 1 of the client-side file upload flow:
Call this tool to get upload_url + session_id.
POST your file(s) to upload_url using multipart/form-data with the Mcp-Session-Id header set to session_id.
Windows PowerShell (handles paths with spaces): curl.exe -X POST -H "Mcp-Session-Id: " -F 'file=@"C:\path with spaces\file.pdf"'
Linux / macOS (handles paths with spaces): curl -X POST -H "Mcp-Session-Id: " -F "file=@'/path/with spaces/file.pdf'"
The server returns: {"uploaded": [{"filename": "...", "uri": "upload://...", "size": ...}]}
Pass the returned upload:// URIs to jira_upload_attachment.
Sessions expire after 30 minutes (configurable via UPLOAD_STAGING_TTL_MINUTES). The base URL defaults to http://localhost:8932 and can be overridden by the MCP_SERVER_BASE_URL environment variable.
Args: ctx: The FastMCP context.
Returns: JSON string with upload_url, session_id, required_headers, and OS-specific usage example.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |