# Update Collection — Raindrop

> Update an existing collection. See the docs here

- Key: `raindrop-update-collection`
- Type: Action (Write)
- Version: 0.0.6
- App: Raindrop (`raindrop`) — https://pipedream.com/apps/raindrop.md
- This page (HTML): https://pipedream.com/apps/raindrop/actions/update-collection
- Hints: destructive · open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/raindrop/actions/update-collection/update-collection.mjs

## Description

Update an existing collection. [See the docs here](https://developer.raindrop.io/v1/collections/methods#update-collection)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `collectionId` | `string` | Yes | The collection ID Options are loaded from the connected account. |
| `expanded` | `boolean` | No | Whether the collection's sub-collections are expanded |
| `title` | `string` | Yes | Name of the collection |
| `sort` | `integer` | No | The order of collection (descending). Defines the position of the collection among all the collections with the same parent ID |
| `public` | `boolean` | No | Collection and raindrops that it contains will be accessible without authentication? |
| `parentId` | `string` | No | The ID of parent collection. Empty for root collections Options are loaded from the connected account. |
| `view` | `string` | No | View style of collection. Defaults to list Options are loaded from the connected account. |
| `cover` | `string[]` | No | Collection cover url |

## Run it

**MCP**

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
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 accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_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": "raindrop",
      },
    },
  },
)

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: "raindrop-update-collection",
  arguments: {
    collectionId: "Collection ID",
    expanded: true,
  },
})
```

**TypeScript**

```ts
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: "raindrop-update-collection",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    raindrop: { authProvisionId: "apn_xxxxxxx" },
    collectionId: "Collection ID",
    expanded: true,
  },
})

console.log(result)
```

**cURL**

```bash
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": "raindrop-update-collection",
    "configured_props": {
      "raindrop": { "authProvisionId": "apn_xxxxxxx" },
      "collectionId": "Collection ID",
      "expanded": true
    }
  }'
```

---

- App: https://pipedream.com/apps/raindrop.md · All apps: https://pipedream.com/apps
