Tables and Fields with NocoDB MCP
An MCP client can build and change the structure of your NocoDB projects: tables, fields, select options and project folders. It can also duplicate projects, tables, fields and views.
These 23 tools are in the Schema section of Tools & Permissions. A tool needs the access level in its row: Read, Read & write, or Read, write & delete.
How the assistant works with tables & fields
Create, update, and delete tables and fields. Add or remove select options. Set the display field of a table. Read the project schema in one call: all tables you can see, with their fields and views.
Duplicate tables, fields, views, and projects. Poll the job status.
Before a field change that can lose data, pass dryRun: true to Update Field or Remove Field Options. NocoDB writes nothing, and the answer gives the number of cell values that the change would clear (cleared_rows) or round (rounded_rows), up to five record ids for each, and, for a select field, the count for each choice that you remove. For a link that becomes a SingleLineText field, the answer also gives the text that the cells would get, the reverse link field that NocoDB would delete, and the lookup, rollup and formula fields that would break.
A dry run counts a type conversion on PostgreSQL only. On another database, and for a conversion to a link field, the counts are null and a warning says why.
Tools
Tables
| Tool | What it does | Access level |
|---|---|---|
getBaseSchema | Every table in the project with its fields and views, in one call: the orientation read, in place of one getTableSchema per table. | Read |
createTable | Create a new table in a project. | Read & write |
updateTable | Update an existing table. | Read & write |
deleteTable | Delete a table from a project. | Read, write & delete |
Fields
| Tool | What it does | Access level |
|---|---|---|
getFieldOptionsSchema | Get the exact JSON Schema for a field options of the given type: the shape createField, updateField and createTable validate against. | Read |
listFields | List all fields (columns) of a table. | Read |
getField | Get a single field (column) by ID. | Read |
createField | Add a new field (column) to a table. | Read & write |
updateField | Update an existing field (column). | Read & write |
addFieldOptions | Add select options (choices) to a single/multi select field. | Read & write |
setDisplayField | Make a field the table's display value: the one shown when the row is referenced from a link, a picker or an expanded record. | Read & write |
deleteField | Delete a field (column) from a table. | Read, write & delete |
removeFieldOptions | Remove select options (choices) from a single/multi select field. | Read, write & delete |
Project folders
Needs folders on your plan. Without it, these tools are not offered.
| Tool | What it does | Access level |
|---|---|---|
listFolders | List folders in the current project with the tables, documents and dashboards inside each under children. | Read |
createFolder | Create a new folder in the current project to group tables, documents and dashboards in the sidebar. | Read & write |
updateFolder | Update an existing folder in the current project. | Read & write |
moveTableToFolder | Move a table into a project folder, or back to the top level with folderId: null. | Read & write |
deleteFolder | Delete a folder. | Read, write & delete |
Duplicates
| Tool | What it does | Access level |
|---|---|---|
getJobStatus | Status of a background job started by one of the duplicate tools. | Read |
duplicateTable | Copy a table into the same project, with its fields, views, data and webhooks. | Read & write |
duplicateField | Copy a field within its table, including its cell values. | Read & write |
duplicateBase | Copy the project this connection is scoped to, into the same workspace. | Read & write |
duplicateView | Copy a view on the same table, with its filters, sorts, grouping and field layout. | Read & write |
Related
Last updated on