# Writer — Pipedream Connect

> Writer is generative AI purpose-built for business teams. World-class companies use Writer to unlock on-brand content at scale.

- API slug: `writer` (use in MCP headers and tool keys)
- Auth: API key (Pipedream-managed)
- Categories: Artificial Intelligence (AI)
- Website: https://writer.com/
- This page (HTML): https://pipedream.com/apps/writer
- Tools: 7 actions · 0 triggers

## Connect via MCP (recommended)

- Endpoint: `https://remote.mcp.pipedream.net/v3`
- Headers: `Authorization: Bearer <token>` · `x-pd-project-id` · `x-pd-environment` · `x-pd-external-user-id` · `x-pd-app-slug: writer`

```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": "writer",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// e.g. run Ask Knowledge Graph:
const result = await mcp.callTool({
  name: "writer-ask-knowledge-graph",
  arguments: {
    graphIds: ["Graph IDs"],
    question: "Question",
  },
})
```

Docs: [MCP guide](https://pipedream.com/docs/connect/mcp/developers.md)

## API proxy

For a Writer endpoint with no pre-built tool, the proxy forwards your request with the connected user's credentials attached.

```bash
# The path segment is the target URL, URL-safe base64 encoded:
# https://api.writer.com/v1/models

curl "https://api.pipedream.com/v1/connect/{project_id}/proxy/aHR0cHM6Ly9hcGkud3JpdGVyLmNvbS92MS9tb2RlbHM?external_user_id={external_user_id}&account_id=apn_xxxxxxx" \
  -H "Authorization: Bearer {access_token}" \
  -H "x-pd-environment: production"
```

Docs: [API proxy guide](https://pipedream.com/docs/connect/api-proxy.md)

## SDK

```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: "writer-ask-knowledge-graph",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    writer: { authProvisionId: "apn_xxxxxxx" },
    graphIds: ["Graph IDs"],
    question: "Question",
  },
})
```

Docs: [Managed auth guide](https://pipedream.com/docs/connect/managed-auth/quickstart.md) · [Tools guide](https://pipedream.com/docs/connect/components.md)

## Actions (7)

### `writer-ask-knowledge-graph` — Ask Knowledge Graph (Read-only)

Ask a natural-language question grounded in one or more of your Writer Knowledge Graphs (RAG). Returns an answer with its sources. Use List Knowledge Graphs first to resolve the graph id(s) you want to query. For free-form generation not grounded in your documents, use Send Prompt instead. Example…

Full schema: https://pipedream.com/apps/writer/actions/ask-knowledge-graph.md

### `writer-get-application` — Get Application (Read-only)

Get a single no-code application (agent) by its application id, including its input schema — the inputs array, where each entry's id is an input field name that Run Application must supply a value for (it is NOT the application's id). Use List Applications first to find the application's id, then…

Full schema: https://pipedream.com/apps/writer/actions/get-application.md

### `writer-list-applications` — List Applications (Read-only)

List the no-code applications (agents) in your Writer workspace. Use this to see which saved agents exist and to resolve an agent's id, then call Get Application to inspect its inputs and Run Application to run it. Handles an empty workspace gracefully (returns an empty list). Auto-paginates up to…

Full schema: https://pipedream.com/apps/writer/actions/list-applications.md

### `writer-list-knowledge-graphs` — List Knowledge Graphs (Read-only)

List the Knowledge Graphs in your Writer workspace. Knowledge Graphs are the retrieval (RAG) sources you can query. Use this to find a graph by name/topic and resolve its id, then pass the id(s) to Ask Knowledge Graph to ask a grounded question. Auto-paginates up to 200 graphs. Example: to get just…

Full schema: https://pipedream.com/apps/writer/actions/list-knowledge-graphs.md

### `writer-list-models` — List Models (Read-only)

List the AI models available in your Writer account (Palmyra family plus any external models). Use this to discover valid model ids and to recommend a model for a task, then pass the chosen id to Send Prompt as its model. Example: call with no parameters -> returns models such as { id…

Full schema: https://pipedream.com/apps/writer/actions/list-models.md

### `writer-run-application` — Run Application (Write)

Run a saved no-code application (agent) with the inputs it expects and return the generated content. Discover the agent's id with List Applications, then call Get Application to see the input field ids (names) it requires before running. Provide inputs as a JSON array of { id, value } objects…

Full schema: https://pipedream.com/apps/writer/actions/run-application.md

### `writer-send-prompt` — Send Prompt (Write)

Generate text with Writer's chat completion API. Use this whenever the user asks you to write, draft, compose, generate, rewrite, summarize, translate, or brainstorm any text with Writer — subject lines, announcements, welcome messages, poems, copy, headlines, translations, and similar. Route these…

Full schema: https://pipedream.com/apps/writer/actions/send-prompt.md

---

- All apps: https://pipedream.com/apps — index: https://pipedream.com/llms.txt
- Pipedream docs for agents: https://pipedream.com/docs/llms.txt
