feat: Add Tables app support (tables, columns, rows CRUD)#156
feat: Add Tables app support (tables, columns, rows CRUD)#156Pavlinchen wants to merge 2 commits intonextcloud:mainfrom
Conversation
Add a new tool module for the Nextcloud Tables app with 12 MCP tools covering full CRUD operations across tables, columns, and rows: Tables: list_tables, create_table, update_table, delete_table Columns: list_columns, create_column, update_column, delete_column Rows: list_rows, create_row, update_row, delete_row Column creation supports all five column types (text, number, selection, datetime, usergroup) with their type-specific configuration parameters. Row data is passed as a JSON string mapping column IDs to values, matching the Tables API v1 contract. Availability check: 'tables' in nc.capabilities. Tested against Nextcloud 32.0.8 with Tables 1.0.5. Signed-off-by: Pavlinchen <paulm.schmidt@icloud.com>
d005177 to
084595d
Compare
|
Thank you for all the new tools! I'll take some time to check these. Did you test all of these tools per hand or per AI agent? |
|
Hello, I had two LLMs with different contexts & prompts verify the functionality. |
|
I'd like you to please run the changes on a local instance and try it out yourself for real, to see if the tools work as expected when actually used :) Developing per LLM is fine, but please check the work manually |
|
@Pavlinchen as soon as you tested this and the other PRs manually, please give me a ping :) |
|
@janepie I have tested the actuall calling of the tools the same way an LLM would locally against a mock instance, but can understand that you would like a full end-to-end test (especially for such a "big" feature). |
|
What do you mean by "creating the docs"? |
|
Ah, that simplifies things significantly, thanks for the clarification. |
|
All good, don't worry :) |
|
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! (If you believe you should not receive this message, you can add yourself to the blocklist.) |
Summary
tables.pytool module with 12 MCP tools for the Nextcloud Tables app/index.php/apps/tables/api/1/)Motivation
The Tables app is one of the most-used Nextcloud apps for structured data (spreadsheet-like tables). It is currently not supported by the Context Agent, meaning the AI assistant cannot read, create, or modify table data. This is a significant gap for users who manage data in Tables alongside Deck, Calendar, and other supported apps.
Implementation Details
Disclaimer
Implementation from a technical perspective was done mainly by a LLM (Claude Opus 4.7 max effort).
Every tool and endpoint response shape was validated end-to-end against Nextcloud 32.0.8 + Tables 1.0.5, with a full lifecycle smoke test completed before opening the PR.
Follows the same patterns as
deck.py,cookbook.py, andbookmarks.py:nc._session._create_adapter().request()for REST API calls@safe_toolfor read operations,@dangerous_toolfor mutationsis_availablechecks'tables' in await nc.capabilitiesTools
list_tablesGET /api/1/tablescreate_tablePOST /api/1/tablesupdate_tablePUT /api/1/tables/{tableId}delete_tableDELETE /api/1/tables/{tableId}list_columnsGET /api/1/tables/{tableId}/columnscreate_columnPOST /api/1/tables/{tableId}/columnsupdate_columnPUT /api/1/columns/{columnId}delete_columnDELETE /api/1/columns/{columnId}list_rowsGET /api/1/tables/{tableId}/rowscreate_rowPOST /api/1/tables/{tableId}/rowsupdate_rowPUT /api/1/rows/{rowId}delete_rowDELETE /api/1/rows/{rowId}Column types
create_columnaccepts acolumn_typeparameter with type-specific optional parameters:textnumberselectiondatetimeusergroupRow data format
create_rowandupdate_rowaccept adataparameter as a JSON string mapping column IDs to values:{"5": "Alice", "6": 95}This matches the Tables API v1 contract where the backend converts
{columnId: value}pairs internally.Test Plan