jira_construct_upload_endpoint
Obtains an upload URL and session token for uploading files to the MCP server, enabling later attachment to Jira issues.
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 |