move_view_to_section
Move a view to a specific section or position in the Airtable sidebar. Reorder sections and views by specifying target index and optional section ID.
Instructions
Move a view (or a section itself) within the sidebar. The single endpoint covers four user actions depending on the arguments:
viewId + sectionId → put the view INTO that section at targetIndex
viewId + sectionId: null → move the view OUT to ungrouped at table-level targetIndex
sectionId-as-viewIdOrSectionId + targetIndex → reorder the section among other sections
viewId + same section → reorder the view within its current section For section reorders, targetIndex is into the table's top-level mixed viewOrder; for in-section moves, it's into that section's viewOrder.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| appId | Yes | The Airtable base/application ID | |
| tableId | Yes | The table ID (tbl-prefixed) | |
| viewIdOrSectionId | Yes | A view ID (viw...) or section ID (vsc...) to move | |
| targetIndex | Yes | Destination index (0 = top). Per-section for in-section moves; per-table for section reorders. | |
| targetSectionId | No | Optional vsc-prefixed section ID to move INTO. Omit (or pass null) to move the view to ungrouped. | |
| debug | No | When true, include raw Airtable response in output for diagnostics |
Implementation Reference
- The handler function for the move_view_to_section tool. Destructures appId, tableId, viewIdOrSectionId, targetIndex, and targetSectionId from args, calls client.moveViewOrViewSection, and returns success response.
async move_view_to_section({ appId, tableId, viewIdOrSectionId, targetIndex, targetSectionId, debug }) { const result = await client.moveViewOrViewSection( appId, tableId, viewIdOrSectionId, targetIndex, targetSectionId === null || targetSectionId === undefined ? undefined : targetSectionId, ); return ok({ updated: true, viewIdOrSectionId, targetIndex, targetSectionId: targetSectionId ?? null }, result, debug); }, - Input schema definition for the move_view_to_section tool, requiring appId, tableId, viewIdOrSectionId, targetIndex with optional targetSectionId and debug.
{ name: 'move_view_to_section', description: `Move a view (or a section itself) within the sidebar. The single endpoint covers four user actions depending on the arguments: - viewId + sectionId → put the view INTO that section at targetIndex - viewId + sectionId: null → move the view OUT to ungrouped at table-level targetIndex - sectionId-as-viewIdOrSectionId + targetIndex → reorder the section among other sections - viewId + same section → reorder the view within its current section For section reorders, targetIndex is into the table's top-level mixed viewOrder; for in-section moves, it's into that section's viewOrder.`, annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false }, inputSchema: { type: 'object', properties: { appId: { type: 'string', description: 'The Airtable base/application ID' }, tableId: { type: 'string', description: 'The table ID (tbl-prefixed)' }, viewIdOrSectionId: { type: 'string', description: 'A view ID (viw...) or section ID (vsc...) to move' }, targetIndex: { type: 'number', description: 'Destination index (0 = top). Per-section for in-section moves; per-table for section reorders.' }, targetSectionId: { type: 'string', description: 'Optional vsc-prefixed section ID to move INTO. Omit (or pass null) to move the view to ungrouped.' }, debug: debugProp, }, required: ['appId', 'tableId', 'viewIdOrSectionId', 'targetIndex'], }, }, - Input schema definition for the move_view_to_section MCP tool.
{ name: 'move_view_to_section', description: `Move a view (or a section itself) within the sidebar. The single endpoint covers four user actions depending on the arguments: - viewId + sectionId → put the view INTO that section at targetIndex - viewId + sectionId: null → move the view OUT to ungrouped at table-level targetIndex - sectionId-as-viewIdOrSectionId + targetIndex → reorder the section among other sections - viewId + same section → reorder the view within its current section For section reorders, targetIndex is into the table's top-level mixed viewOrder; for in-section moves, it's into that section's viewOrder.`, annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false }, inputSchema: { type: 'object', properties: { appId: { type: 'string', description: 'The Airtable base/application ID' }, tableId: { type: 'string', description: 'The table ID (tbl-prefixed)' }, viewIdOrSectionId: { type: 'string', description: 'A view ID (viw...) or section ID (vsc...) to move' }, targetIndex: { type: 'number', description: 'Destination index (0 = top). Per-section for in-section moves; per-table for section reorders.' }, targetSectionId: { type: 'string', description: 'Optional vsc-prefixed section ID to move INTO. Omit (or pass null) to move the view to ungrouped.' }, debug: debugProp, }, required: ['appId', 'tableId', 'viewIdOrSectionId', 'targetIndex'], }, }, - The client method moveViewOrViewSection that sends the actual API request to Airtable's /v0.3/table/{tableId}/moveViewOrViewSection endpoint.
async moveViewOrViewSection(appId, tableId, viewIdOrViewSectionId, targetIndex, targetViewSectionId = undefined) { assertAirtableId(appId, 'appId'); assertAirtableId(tableId, 'tableId'); if (!viewIdOrViewSectionId) { throw new Error('moveViewOrViewSection requires viewIdOrViewSectionId'); } const url = `https://airtable.com/v0.3/table/${tableId}/moveViewOrViewSection`; const payload = { viewIdOrViewSectionId, targetIndex: Number.isFinite(targetIndex) ? targetIndex : 0 }; if (targetViewSectionId) payload.targetViewSectionId = targetViewSectionId; const res = await this.auth.postForm(url, this._mutationParams(payload, appId), appId); if (!res.ok) { const errBody = await res.text().catch(() => ''); throw new Error(`moveViewOrViewSection failed (${res.status}): ${errBody}`); } this.cache.invalidate(appId); return res.json(); } - packages/mcp-server/src/tool-config.js:85-86 (registration)Registration/Categorization of move_view_to_section in the 'view-section' category in TOOL_CATEGORIES.
move_view_to_section: 'view-section',