Retriever ACTION
Create Device Return
Creates a device return order. See the documentation
- Action
- Writes data
- API key
- SDK
- MCP
IMPLEMENTATION
Call this tool
Connect a user's Retriever account once, then configure and run Create Device Return 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: "retriever-create-device-return",
externalUserId: "{external_user_id}", // any stable ID for this user in your system
configuredProps: {
retriever: { authProvisionId: "apn_xxxxxxx" },
requestCharger: true,
employeeInfoEmail: "Employee Info Email",
},
})
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": "retriever-create-device-return",
"configured_props": {
"retriever": { "authProvisionId": "apn_xxxxxxx" },
"requestCharger": true,
"employeeInfoEmail": "Employee Info Email"
}
}'// 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": "retriever",
},
},
},
)
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: "retriever-create-device-return",
arguments: {
requestCharger: true,
employeeInfoEmail: "Employee Info Email",
},
})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 |
|---|---|---|
requestCharger Request Charger | boolean | Whether or not to request a charger with the device return. Required |
employeeInfoEmail Employee Info Email | string | Optional email address for notifying the employee when a box ships and is delivered, as well as sending reminders. Optional |
employeeInfoName Employee Info Name | string | The employee name to print on the shipping label. Required |
employeeInfoAddressLine1 Employee Info Address Line 1 | string | The first line of the employee's address (typically the street address), or a full, comma-separated address. If providing the Employee Info Address Line 1, Employee Info Address City, Employee Info Address State, and Employee Info Address Zip are required (Employee Info Address Line 2 remains optional). If providing a full address, it is best to use the format 1 Main St, New York, NY 10001 or 1 Main St, Apt 200, New York, NY 10001. We will attempt to parse any full address, but cannot guarantee accuracy - especially if other formats are used. It is highly recommended to provide the address in separate fields. Required |
employeeInfoAddressLine2 Employee Info Address Line 2 | string | Optional second line of the employee's address. Optional |
employeeInfoAddressCity Employee Info Address City | string | Optional if a full address is provided in Employee Info Address Line 1. Required otherwise. Optional |
employeeInfoAddressState Employee Info Address State | string | Optional if a full address is provided in Employee Info Address Line 1. Required otherwise. Optional |
employeeInfoAddressZip Employee Info Address Zip | string | Optional if a full address is provided in Employee Info Address Line 1. Required otherwise. Optional |
companyInfoReturnRecipientName Company Info Return Recipient Name | string | The return recipient name to print on the shipping label. Required |
companyInfoReturnAddressCompany Company Info Return Address Company | string | The return recipient company to print on the shipping label. Optional |
companyInfoReturnAddressLine1 Company Info Return Address Line 1 | string | The first line of the return address (typically the street address), or a full, comma-separated address. If providing the Company Info Return Address Line 1, Company Info Return Address City, Company Info Return Address State, and Company Info Return Address Zip are required (Company Info Return Address Line 2 remains optional). If providing a full address, it is best to use the format 1 Main St, New York, NY 10001 or 1 Main St, Apt 200, New York, NY 10001. We will attempt to parse any full address, but cannot guarantee accuracy - especially if other formats are used. It is highly recommended to provide the address in separate fields. Required |
companyInfoReturnAddressLine2 Company Info Return Address Line 2 | string | Optional second line of the return address. Optional |
companyInfoReturnAddressCity Company Info Return Address City | string | Optional if a full address is provided in Company Info Return Address Line 1. Required otherwise. Optional |
companyInfoReturnAddressState Company Info Return Address State | string | Optional if a full address is provided in Company Info Return Address Line 1. Required otherwise. Optional |
companyInfoReturnAddressZip Company Info Return Address Zip | string | Optional if a full address is provided in Company Info Return Address Line 1. Required otherwise. Optional |
companyInfoDisplayName Company Info Display Name | string | Used in email communications with the employee. Required |
companyInfoNotificationEmail Company Info Notification Email | string | Optional email address for updates on the status of this device return. 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
- retriever-create-device-return
- Version
- 0.0.2
- App
- Retriever
- Authentication
- API key
- Read-only
- No
- Destructive
- No
- Open world
- Yes
- Source
- View on GitHub ↗