| { |
| "name": "prepare_attachment_upload", |
| "description": "Prepare a direct Linear file upload for an existing issue.\n\nWorkflow:\n1. Call this tool with issue, filename, contentType, and size.\n2. Upload raw bytes with PUT to uploadRequest.url outside MCP.\n3. All headers in uploadRequest.headers are part of the signed request, so send them verbatim.\n4. After PUT succeeds, call create_attachment_from_upload with assetUrl to link it to the issue.\n\nDo not base64-encode or transform the file. Use curl --data-binary @path or fetch(url, { method: 'PUT', body: blob }).\nOmitting or modifying any signed header, including casing, will return HTTP 403.\nThe signed URL must be used within 60 seconds or it will expire.\n\nUpload sequencing:\nPrepare, PUT, and finalize one file before calling this tool for another file.\nDo not batch multiple prepare_attachment_upload calls before starting the PUTs because earlier signed URLs can expire while later files are prepared.\n\nExample:\ncurl -X PUT --data-binary @file.png \\\n -H \"content-type: image/png\" \\\n -H \"x-goog-content-length-range: N,N\" \\\n -H \"cache-control: public, max-age=31536000\" \\\n -H 'Content-Disposition: attachment; filename=\"file.png\"' \\\n \"<uploadRequest.url>\"", |
| "inputSchema": { |
| "$schema": "http://json-schema.org/draft-07/schema#", |
| "type": "object", |
| "properties": { |
| "issue": { |
| "type": "string", |
| "description": "Issue ID or identifier (e.g., LIN-123)" |
| }, |
| "filename": { |
| "type": "string", |
| "description": "Filename for the upload, e.g. screenshot.png" |
| }, |
| "contentType": { |
| "type": "string", |
| "description": "MIME type, e.g. image/png or application/pdf" |
| }, |
| "size": { |
| "type": "integer", |
| "exclusiveMinimum": 0, |
| "maximum": 9007199254740991, |
| "description": "Exact file size in bytes. Must be smaller than 2 GB." |
| }, |
| "title": { |
| "description": "Suggested attachment title for the finalize step", |
| "type": "string" |
| }, |
| "subtitle": { |
| "description": "Suggested attachment subtitle for the finalize step", |
| "type": "string" |
| } |
| }, |
| "required": [ |
| "issue", |
| "filename", |
| "contentType", |
| "size" |
| ], |
| "additionalProperties": false |
| } |
| } |