Files
baserow/docs/development
Davide Silvestri cf15a4a02f refactor (MCP): refactor MCP tools; share AI Assistant capabilities (#4980)
* feat(mcp): refactor tools to service layer and add database/table/field CRUD

Replace internal API request pattern with a dedicated service module for
MCP operations. Simplify tool architecture from dynamic per-table tools
to static tools with explicit table_id parameters. Add new tools for
managing databases, tables, fields, and batch row operations.

* fix(mcp): address Copilot review feedback

- Let exceptions propagate from MCPTool.call() so call_tool() logs them
- Fix N+1 queries in get_table_schema using enhance_field_queryset hook
- Fetch fields for all tables in a single specific_iterator pass
- Clamp list_rows pagination to safe bounds (ROW_PAGE_SIZE_LIMIT)
- Fix update_fields docstring to reflect type-change support
- Fix module path in utils.py comment
- Update "Adding a new tool" docs to match current MCPTool pattern

* fix: comment risky tools; waiting for a proper permission check

* feat(mcp): add enabled flag to MCPTool and disable risky tools

Add `enabled` attribute to MCPTool base class so tools can be registered
but hidden from MCP clients. Disable database/table/field CRUD tools
until users can control tool availability through the UI.

Also add docs/testing/mcp-test-plan.md with manual testing instructions.

* fix(mcp): replace list[dict] with typed Pydantic models for field/row specs

Validate required keys (name+type for field create, id for field update,
id for row update) at the schema level instead of relying on KeyError
from dict.pop() in the service layer.

Uses extra="allow" so type-specific options and field values pass through.

* fix: wrap update_rows in a transaction

* address feedback
2026-04-01 08:52:59 +00:00
..
2023-09-28 13:39:41 +00:00
2024-06-25 11:35:04 +00:00
2025-10-08 09:13:38 +02:00