# Register System — Papertrail

> Create a new log sender. See the documentation

- Key: `papertrail-register-system`
- Type: Action (Write)
- Version: 0.0.1
- App: Papertrail (`papertrail`) — https://pipedream.com/apps/papertrail.md
- This page (HTML): https://pipedream.com/apps/papertrail/actions/register-system
- Hints: open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/papertrail/actions/register-system/register-system.mjs

## Description

Create a new log sender. [See the documentation](https://www.papertrail.com/help/settings-api/#register-system)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `name` | `string` | Yes | Display name of the system in Papertrail |
| `hostname` | `string` | No | Syslog hostname filter (required when using a log destination). Events from other hostnames may be dropped when set. |
| `ipAddress` | `string` | No | Source IP for standard syslog (port 514). Use this flow when not using a custom destination. |
| `destinationId` | `string` | No | Log destination ID from your Papertrail account |
| `destinationPort` | `string` | No | Destination port number (alternative to Destination ID) |
| `description` | `string` | No | Optional freeform description |
| `autoDelete` | `boolean` | No | Whether Papertrail may automatically remove the system when idle (default follows destination or API default) |

## 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": "papertrail",
      },
    },
  },
)

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: "papertrail-register-system",
  arguments: {
    name: "Name",
    hostname: "Hostname",
  },
})
```

**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: "papertrail-register-system",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    papertrail: { authProvisionId: "apn_xxxxxxx" },
    name: "Name",
    hostname: "Hostname",
  },
})

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": "papertrail-register-system",
    "configured_props": {
      "papertrail": { "authProvisionId": "apn_xxxxxxx" },
      "name": "Name",
      "hostname": "Hostname"
    }
  }'
```

---

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