Jira Service Desk ACTION
Manage Request Attachment
Adds, replaces, or deletes a single attachment on a customer request (ticket) that already exists. To attach file(s) while creating a brand-new request, use Create Request's
attachments prop instead — use this tool only for requests that already exist. Set operation to add to attach a new file, update to replace an existing attachment with a different file (there's no in-place replace in the API, so this uploads the new file and only deletes the old one once the new one is confirmed attached), or delete to remove an attachment. add and update require serviceDeskId (the temp-file upload step is scoped by service desk, not by issue) — use List Service Desks to find it, or read it off the response of the request that created the ticket. update and delete require attachmentId, the numeric ID of the attachment being replaced or removed; the add/update response doesn't expose this as a plain field, so use List Issue Attachments on the same request to look it up. Worked example: to replace an attachment 10050 on request HD-12 with a new file, call with Operation update, Issue ID Or Key HD-12, Service Desk ID 1, Attachment ID 10050, and File /tmp/revised-report.pdf. For update, if the new file attaches successfully but removing the old attachment then fails, the response includes a deleteError string alongside the successful attachment data — the request ends up with both files rather than losing either one, and the error is never masked as a full failure. By default the attachment is visible to the customer who raised the request (public: true); set public to false to attach an internal-only file. See the documentation- Action
- Writes data
- Destructive
- OAuth
- SDK
- MCP
IMPLEMENTATION
Call this tool
Connect a user's Jira Service Desk account once, then configure and run Manage Request Attachment from your backend or agent.
import { PipedreamClient } from "@pipedream/sdk"
const pd = new PipedreamClient({
projectId: process.env.PIPEDREAM_PROJECT_ID!,
clientId: process.env.PIPEDREAM_CLIENT_ID!,
clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
projectEnvironment: "production",
})
const result = await pd.actions.run({
id: "jira_service_desk-manage-request-attachment",
externalUserId: "{external_user_id}", // any stable ID for this user in your system
configuredProps: {
jira_service_desk: { authProvisionId: "apn_xxxxxxx" },
cloudId: "Cloud ID",
operation: "Operation",
},
})
console.log(result)curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
-H "Content-Type: application/json" \
-H "X-PD-Environment: production" \
-H "Authorization: Bearer {access_token}" \
-d '{
"external_user_id": "{external_user_id}",
"id": "jira_service_desk-manage-request-attachment",
"configured_props": {
"jira_service_desk": { "authProvisionId": "apn_xxxxxxx" },
"cloudId": "Cloud ID",
"operation": "Operation"
}
}'// accessToken: mint a short-lived token with the Connect SDK — see the MCP guide
const transport = new StreamableHTTPClientTransport(
new URL("https://remote.mcp.pipedream.net/v3"),
{
requestInit: {
headers: {
Authorization: `Bearer ${accessToken}`,
"x-pd-project-id": "{project_id}",
"x-pd-environment": "production",
"x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
"x-pd-app-slug": "jira_service_desk",
},
},
},
)
const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)
const { tools } = await mcp.listTools()
// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
name: "jira_service_desk-manage-request-attachment",
arguments: {
cloudId: "Cloud ID",
operation: "Operation",
},
})SCHEMA
Inputs
Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.
| Property | Type | Description |
|---|---|---|
cloudId Cloud ID | string | The Atlassian site (cloud) ID, e.g. 822faf0d-5427-420e-9016-999d3dc76918. Run List Sites to get the id of every site you can access. Required |
operation Operation | string | Whether to add a new attachment, replace ( update) an existing one, or delete one. Required |
issueIdOrKey Issue ID or Key | string | The ID or key of the Jira Service Desk request (e.g. IT-42 or 10001). Use List My Requests to find the issueKey of a request (in its requests array). Required |
serviceDeskId Service Desk ID | string | Required for add and update. The service desk the request belongs to. Use List Service Desks to find valid IDs (e.g. 1). Optional |
file File | string | Required for add and update. The file to attach, as a file URL or a path to a file in the /tmp directory (e.g. /tmp/myFile.pdf). Optional |
attachmentId Attachment ID | string | Required for update and delete. The numeric ID of the attachment being replaced or removed, e.g. 10050. The add/update response doesn't expose this as a plain field — the ID is only embedded in a _links.jiraRest URL nested under attachments.values[]. Use List Issue Attachments instead, which extracts the ID for you. Optional |
public Public | boolean | Whether the attached file is visible to the customer who raised the request. Defaults to true; set to false to attach an internal-only file. Only applies to add and update. Optional |
syncDir SyncDir | dir | Optional |
REFERENCE
Tool details
Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.
- Registry key
- jira_service_desk-manage-request-attachment
- Version
- 0.0.2
- App
- Jira Service Desk
- Authentication
- OAuth
- Read-only
- No
- Destructive
- Yes
- Open world
- Yes
- Source
- View on GitHub ↗