# Create Entry — Memento Database

> Create an entry in a library on Memento Database. See the documentation

- Key: `memento_database-create-entry`
- Type: Action (Write)
- Version: 0.0.1
- App: Memento Database (`memento_database`) — https://pipedream.com/apps/memento-database.md
- This page (HTML): https://pipedream.com/apps/memento-database/actions/create-entry
- Hints: open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/memento_database/actions/create-entry/create-entry.mjs

## Description

Create an entry in a library on Memento Database. [See the documentation](https://mementodatabase.docs.apiary.io/#reference/0/entries/create-a-new-entry)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `libraryId` | `string` | Yes | The ID of a library Options are loaded from the connected account. |
| `fields` | `string[]` | Yes | An array of objects containing the fields of the entry. Note: The field IDs must already exist in the library. Example: [{ "id": 1, "value": "Record 1" }, { "id": 2, "value": 1000 }] |

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

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: "memento_database-create-entry",
  arguments: {
    libraryId: "Library ID",
    fields: ["Fields"],
  },
})
```

**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: "memento_database-create-entry",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    memento_database: { authProvisionId: "apn_xxxxxxx" },
    libraryId: "Library ID",
    fields: ["Fields"],
  },
})

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": "memento_database-create-entry",
    "configured_props": {
      "memento_database": { "authProvisionId": "apn_xxxxxxx" },
      "libraryId": "Library ID",
      "fields": ["Fields"]
    }
  }'
```

---

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