> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pinkfish.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# clay

> Clay API

**Server path:** `/clay` | **Type:** Application | **PCID required:** Yes

## Tools

| Tool                                              | Description                     |
| ------------------------------------------------- | ------------------------------- |
| [`clay_create_import`](#clay_create_import)       | Create a bulk import            |
| [`clay_create_table`](#clay_create_table)         | Create a table                  |
| [`clay_delete_table`](#clay_delete_table)         | Delete a table                  |
| [`clay_export_table`](#clay_export_table)         | Export a table                  |
| [`clay_get_current_user`](#clay_get_current_user) | Get the current user (detailed) |
| [`clay_get_export`](#clay_get_export)             | Get an export                   |
| [`clay_get_import`](#clay_get_import)             | Get an import                   |
| [`clay_get_me`](#clay_get_me)                     | Get the authenticated user      |
| [`clay_get_source`](#clay_get_source)             | Get a source                    |
| [`clay_get_table`](#clay_get_table)               | Get a table                     |
| [`clay_list_exports`](#clay_list_exports)         | List exports                    |
| [`clay_list_imports`](#clay_list_imports)         | List imports                    |
| [`clay_list_sources`](#clay_list_sources)         | List sources                    |
| [`clay_list_tables`](#clay_list_tables)           | List tables                     |
| [`clay_list_users`](#clay_list_users)             | List workspace users            |
| [`clay_list_workspaces`](#clay_list_workspaces)   | List workspaces                 |
| [`clay_query_table`](#clay_query_table)           | Query a table                   |
| [`clay_update_table`](#clay_update_table)         | Update a table                  |

***

## clay\_create\_import

Create a bulk import

**Parameters:**

| Parameter | Type      | Required | Default | Description                                                 |
| --------- | --------- | -------- | ------- | ----------------------------------------------------------- |
| `rows`    | object\[] | Yes      | —       | Rows to insert. Each row is an object keyed by column name. |
| `tableId` | string    | Yes      | —       | Target table id.                                            |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "rows": {
        "type": "array",
        "items": {
          "type": "object"
        },
        "description": "Rows to insert. Each row is an object keyed by column name."
      },
      "tableId": {
        "type": "string",
        "description": "Target table id."
      }
    },
    "required": [
      "PCID",
      "rows",
      "tableId"
    ]
  }
  ```
</Expandable>

***

## clay\_create\_table

Create a table

**Parameters:**

| Parameter     | Type      | Required | Default | Description                               |
| ------------- | --------- | -------- | ------- | ----------------------------------------- |
| `columns`     | object\[] | No       | —       | Initial column definitions for the table. |
| `description` | string    | No       | —       | Optional table description.               |
| `name`        | string    | Yes      | —       | Human-readable table name.                |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "columns": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string",
              "description": "The name value"
            },
            "type": {
              "type": "string",
              "description": "Column type (e.g. text, number, person, company, url)."
            },
            "description": {
              "type": "string",
              "description": "The description value"
            }
          },
          "required": [
            "name",
            "type"
          ]
        },
        "description": "Initial column definitions for the table."
      },
      "description": {
        "type": "string",
        "description": "Optional table description."
      },
      "name": {
        "type": "string",
        "description": "Human-readable table name."
      }
    },
    "required": [
      "PCID",
      "name"
    ]
  }
  ```
</Expandable>

***

## clay\_delete\_table

Delete a table

**Parameters:**

| Parameter | Type   | Required | Default | Description |
| --------- | ------ | -------- | ------- | ----------- |
| `tableId` | string | Yes      | —       | Table id.   |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "tableId": {
        "type": "string",
        "description": "Table id."
      }
    },
    "required": [
      "PCID",
      "tableId"
    ]
  }
  ```
</Expandable>

***

## clay\_export\_table

Export a table

**Parameters:**

| Parameter | Type      | Required | Default | Description                                                    |
| --------- | --------- | -------- | ------- | -------------------------------------------------------------- |
| `tableId` | string    | Yes      | —       | Table id.                                                      |
| `columns` | string\[] | No       | —       | Optional list of columns to include. Returns all when omitted. |
| `format`  | string    | No       | —       | Export format (defaults to csv).                               |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "tableId": {
        "type": "string",
        "description": "Table id."
      },
      "columns": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Optional list of columns to include. Returns all when omitted."
      },
      "format": {
        "type": "string",
        "description": "Export format (defaults to csv).",
        "enum": [
          "csv",
          "json"
        ]
      }
    },
    "required": [
      "PCID",
      "tableId"
    ]
  }
  ```
</Expandable>

***

## clay\_get\_current\_user

Get the current user (detailed)

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## clay\_get\_export

Get an export

**Parameters:**

| Parameter  | Type   | Required | Default | Description |
| ---------- | ------ | -------- | ------- | ----------- |
| `exportId` | string | Yes      | —       | Export id.  |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "exportId": {
        "type": "string",
        "description": "Export id."
      }
    },
    "required": [
      "PCID",
      "exportId"
    ]
  }
  ```
</Expandable>

***

## clay\_get\_import

Get an import

**Parameters:**

| Parameter  | Type   | Required | Default | Description |
| ---------- | ------ | -------- | ------- | ----------- |
| `importId` | string | Yes      | —       | Import id.  |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "importId": {
        "type": "string",
        "description": "Import id."
      }
    },
    "required": [
      "PCID",
      "importId"
    ]
  }
  ```
</Expandable>

***

## clay\_get\_me

Get the authenticated user

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## clay\_get\_source

Get a source

**Parameters:**

| Parameter  | Type   | Required | Default | Description |
| ---------- | ------ | -------- | ------- | ----------- |
| `sourceId` | string | Yes      | —       | Source id.  |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "sourceId": {
        "type": "string",
        "description": "Source id."
      }
    },
    "required": [
      "PCID",
      "sourceId"
    ]
  }
  ```
</Expandable>

***

## clay\_get\_table

Get a table

**Parameters:**

| Parameter | Type   | Required | Default | Description |
| --------- | ------ | -------- | ------- | ----------- |
| `tableId` | string | Yes      | —       | Table id.   |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "tableId": {
        "type": "string",
        "description": "Table id."
      }
    },
    "required": [
      "PCID",
      "tableId"
    ]
  }
  ```
</Expandable>

***

## clay\_list\_exports

List exports

**Parameters:**

| Parameter | Type    | Required | Default | Description                                |
| --------- | ------- | -------- | ------- | ------------------------------------------ |
| `tableId` | string  | No       | —       | Filter to exports for the given table.     |
| `status`  | string  | No       | —       | Filter by export status.                   |
| `limit`   | integer | No       | —       | Maximum number of results to return        |
| `cursor`  | string  | No       | —       | Pagination cursor from a previous response |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "tableId": {
        "type": "string",
        "description": "Filter to exports for the given table."
      },
      "status": {
        "type": "string",
        "description": "Filter by export status.",
        "enum": [
          "queued",
          "running",
          "succeeded",
          "failed"
        ]
      },
      "limit": {
        "type": "integer",
        "description": "Maximum number of results to return"
      },
      "cursor": {
        "type": "string",
        "description": "Pagination cursor from a previous response"
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## clay\_list\_imports

List imports

**Parameters:**

| Parameter | Type    | Required | Default | Description                                |
| --------- | ------- | -------- | ------- | ------------------------------------------ |
| `tableId` | string  | No       | —       | Filter to imports for the given table.     |
| `status`  | string  | No       | —       | Filter by import status.                   |
| `limit`   | integer | No       | —       | Maximum number of results to return        |
| `cursor`  | string  | No       | —       | Pagination cursor from a previous response |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "tableId": {
        "type": "string",
        "description": "Filter to imports for the given table."
      },
      "status": {
        "type": "string",
        "description": "Filter by import status.",
        "enum": [
          "queued",
          "running",
          "succeeded",
          "failed"
        ]
      },
      "limit": {
        "type": "integer",
        "description": "Maximum number of results to return"
      },
      "cursor": {
        "type": "string",
        "description": "Pagination cursor from a previous response"
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## clay\_list\_sources

List sources

**Parameters:**

| Parameter | Type    | Required | Default | Description                                    |
| --------- | ------- | -------- | ------- | ---------------------------------------------- |
| `tableId` | string  | No       | —       | Filter to sources attached to the given table. |
| `limit`   | integer | No       | —       | Maximum number of results to return            |
| `cursor`  | string  | No       | —       | Pagination cursor from a previous response     |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "tableId": {
        "type": "string",
        "description": "Filter to sources attached to the given table."
      },
      "limit": {
        "type": "integer",
        "description": "Maximum number of results to return"
      },
      "cursor": {
        "type": "string",
        "description": "Pagination cursor from a previous response"
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## clay\_list\_tables

List tables

**Parameters:**

| Parameter | Type    | Required | Default | Description                                      |
| --------- | ------- | -------- | ------- | ------------------------------------------------ |
| `limit`   | integer | No       | —       | Maximum number of tables to return (default 50). |
| `cursor`  | string  | No       | —       | Pagination cursor returned by a previous call.   |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "limit": {
        "type": "integer",
        "description": "Maximum number of tables to return (default 50)."
      },
      "cursor": {
        "type": "string",
        "description": "Pagination cursor returned by a previous call."
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## clay\_list\_users

List workspace users

**Parameters:**

| Parameter | Type    | Required | Default | Description                                     |
| --------- | ------- | -------- | ------- | ----------------------------------------------- |
| `limit`   | integer | No       | —       | Maximum number of users to return (default 50). |
| `cursor`  | string  | No       | —       | Pagination cursor returned by a previous call.  |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "limit": {
        "type": "integer",
        "description": "Maximum number of users to return (default 50)."
      },
      "cursor": {
        "type": "string",
        "description": "Pagination cursor returned by a previous call."
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## clay\_list\_workspaces

List workspaces

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## clay\_query\_table

Query a table

**Parameters:**

| Parameter | Type      | Required | Default | Description                                                                                                                                                           |
| --------- | --------- | -------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `tableId` | string    | Yes      | —       | Table id.                                                                                                                                                             |
| `columns` | string\[] | No       | —       | Optional list of column names to return. Returns all columns when omitted.                                                                                            |
| `cursor`  | string    | No       | —       | Pagination cursor returned by a previous call.                                                                                                                        |
| `filters` | object    | No       | —       | Filter object keyed by column name. Each value may be a literal or a Mongo-style operator object (e.g. `&#123; "$in": ["a","b"] &#125;`, `&#123; "$gte": 10 &#125;`). |
| `limit`   | integer   | No       | —       | Maximum rows to return (default 50).                                                                                                                                  |
| `sort`    | object\[] | No       | —       | Sort directives applied in order.                                                                                                                                     |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "tableId": {
        "type": "string",
        "description": "Table id."
      },
      "columns": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Optional list of column names to return. Returns all columns when omitted."
      },
      "cursor": {
        "type": "string",
        "description": "Pagination cursor returned by a previous call."
      },
      "filters": {
        "type": "object",
        "description": "Filter object keyed by column name. Each value may be a literal or a Mongo-style operator object (e.g. `{ \"$in\": [\"a\",\"b\"] }`, `{ \"$gte\": 10 }`)."
      },
      "limit": {
        "type": "integer",
        "description": "Maximum rows to return (default 50)."
      },
      "sort": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "column": {
              "type": "string",
              "description": "Column name to sort on."
            },
            "direction": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ],
              "description": "Sort direction."
            }
          }
        },
        "description": "Sort directives applied in order."
      }
    },
    "required": [
      "PCID",
      "tableId"
    ]
  }
  ```
</Expandable>

***

## clay\_update\_table

Update a table

**Parameters:**

| Parameter     | Type   | Required | Default | Description            |
| ------------- | ------ | -------- | ------- | ---------------------- |
| `tableId`     | string | Yes      | —       | Table id.              |
| `description` | string | No       | —       | New table description. |
| `name`        | string | No       | —       | New table name.        |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "tableId": {
        "type": "string",
        "description": "Table id."
      },
      "description": {
        "type": "string",
        "description": "New table description."
      },
      "name": {
        "type": "string",
        "description": "New table name."
      }
    },
    "required": [
      "PCID",
      "tableId"
    ]
  }
  ```
</Expandable>
