Linear (API key) ACTION
Update Document
Update an existing Linear document: rename it, rewrite its body, move it to another project, initiative, team or issue, change its owner, or change its icon or color. Only the fields you provide are changed; set at least one besides
documentId. content replaces the whole body. To append to or edit part of a document, first read the current body with Get Document, then send the full combined markdown. Leave content unset for a rename so the body is kept. To move the document, set at most one of projectId, initiativeId, teamId or issueId. Use Search Documents to find the document ID. To create a new document, use Create Document. The response does not echo the body back; use Get Document to read it. Example (rename): documentId: "10b5bc2940c7", title: "[DRAFT] Q3 Hiring Plan" → returns {success: true, document: {id: "29a25062-...", title: "[DRAFT] Q3 Hiring Plan", slugId: "10b5bc2940c7", url: "https://linear.app/..."}}. Example (replace body): documentId: "10b5bc2940c7", content: "# Q3 Hiring Plan\n\nUpdated goals...". See the documentation- Action
- Writes data
- API key
- SDK
- MCP
IMPLEMENTATION
Call this tool
Connect a user's Linear (API key) account once, then configure and run Update Document 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: "linear_app-update-document",
externalUserId: "{external_user_id}", // any stable ID for this user in your system
configuredProps: {
linear_app: { authProvisionId: "apn_xxxxxxx" },
documentId: "Document ID",
title: "Title",
},
})
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": "linear_app-update-document",
"configured_props": {
"linear_app": { "authProvisionId": "apn_xxxxxxx" },
"documentId": "Document ID",
"title": "Title"
}
}'// 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": "linear_app",
},
},
},
)
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: "linear_app-update-document",
arguments: {
documentId: "Document ID",
title: "Title",
},
})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 |
|---|---|---|
documentId Document ID | string | The UUID or slugId of the document. A UUID looks like a1b2c3d4-0000-0000-0000-000000000001; a slugId is the short alphanumeric code at the end of the document URL (e.g. 10b5bc2940c7). Use Search Documents to find document IDs. Required |
title Title | string | The new title of the document. Example: Q3 Hiring Plan (final). Optional |
content Content | string | The new document body in markdown. Replaces the existing body in full. To keep existing text, read it first with Get Document and send the combined markdown. Example: # Q3 Hiring Plan\n\nUpdated goals.... Optional |
projectId Project | string | Move the document to this project (UUID or identifier, e.g. a1b2c3d4-0000-0000-0000-000000000001 or P-LIN-123). Set at most one of projectId, initiativeId, teamId or issueId. Use List Projects to find valid project IDs. Optional |
initiativeId Initiative | string | Move the document to this initiative (UUID or identifier, e.g. b2c3d4e5-0000-0000-0000-000000000002 or I-12). Set at most one of projectId, initiativeId, teamId or issueId. Use List Initiatives to find valid initiative IDs. Optional |
teamId Team | string | Move the document to this team (UUID, e.g. 9d1c3f7e-2b48-4c6a-9f1e-5a7b8c9d0e1f). The short team key such as ENG is rejected. Set at most one of projectId, initiativeId, teamId or issueId. Use Get Teams to find valid team IDs. Optional |
issueId Issue | string | Move the document to this issue (UUID or identifier, e.g. 7df5e7f9-a357-4539-ae94-4a004fec635f or ENG-123). Set at most one of projectId, initiativeId, teamId or issueId. Use Search Issues to find valid issues. Optional |
ownerId Owner | string | The UUID of the user to make the document owner (e.g. abc12345-0000-0000-0000-000000000001). Use List Users to find valid user IDs. Optional |
icon Icon | string | The new document icon, as an emoji shortcode. Raw emoji such as 📄 are rejected. Example: :page_facing_up:. Optional |
color Color | string | The new icon color, as a hex code. Example: #5e6ad2. 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
- linear_app-update-document
- Version
- 0.0.2
- App
- Linear (API key)
- Authentication
- API key
- Read-only
- No
- Destructive
- No
- Open world
- Yes
- Source
- View on GitHub ↗