show_or_hide_view_columns
Show or hide multiple columns in an Airtable view by passing field IDs and a visibility flag. All specified columns are set to the same visibility in one call.
Instructions
Show or hide specific fields (columns) in a view. Pass an array of column IDs and a single visibility flag — every ID in the array is set to that visibility. To toggle many fields at once, send the full set in one call (no separate "show all" / "hide all" tool exists today; that lives in 2.4.0+).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| appId | Yes | The Airtable base/application ID | |
| viewId | Yes | The view ID (e.g. "viwXXX") | |
| columnIds | Yes | Array of field IDs to show or hide | |
| visibility | Yes | true to show, false to hide | |
| debug | No | When true, include raw Airtable response in output for diagnostics |
Implementation Reference
- Tool handler function for 'show_or_hide_view_columns'. Calls client.showOrHideColumns() with the appId, viewId, columnIds array, and visibility flag, then returns the result.
async show_or_hide_view_columns({ appId, viewId, columnIds, visibility, debug }) { const result = await client.showOrHideColumns(appId, viewId, columnIds, visibility); return ok( { updated: true, viewId, columnIds, visibility }, result, debug, ); }, - Client-side implementation of showOrHideColumns. Sends POST to /v0.3/view/{viewId}/showOrHideColumns with payload { columnIds, visibility }. This is the actual Airtable API call.
/** * Show or hide specific columns in a view. * Payload: { columnIds: ["fldXXX", ...], visibility: boolean } */ async showOrHideColumns(appId, viewId, columnIds, visibility) { assertAirtableId(appId, 'appId'); assertAirtableId(viewId, 'viewId'); const url = `https://airtable.com/v0.3/view/${viewId}/showOrHideColumns`; const payload = { columnIds, visibility }; const res = await this.auth.postForm(url, this._mutationParams(payload, appId), appId); if (!res.ok) { const errBody = await res.text().catch(() => ''); throw new Error(`showOrHideColumns failed (${res.status}): ${errBody}`); } return res.json(); } - Schema/definition for the 'show_or_hide_view_columns' tool. Defines input parameters: appId (required), viewId (required), columnIds (array of field IDs, required), visibility (boolean true/false, required), and optional debug.
{ name: 'show_or_hide_view_columns', description: 'Show or hide specific fields (columns) in a view. Pass an array of column IDs and a single visibility flag — every ID in the array is set to that visibility. To toggle many fields at once, send the full set in one call (no separate "show all" / "hide all" tool exists today; that lives in 2.4.0+).', annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false }, inputSchema: { type: 'object', properties: { appId: { type: 'string', description: 'The Airtable base/application ID' }, viewId: { type: 'string', description: 'The view ID (e.g. "viwXXX")' }, columnIds: { type: 'array', items: { type: 'string' }, description: 'Array of field IDs to show or hide', }, visibility: { type: 'boolean', description: 'true to show, false to hide' }, debug: debugProp, }, required: ['appId', 'viewId', 'columnIds', 'visibility'], }, }, - packages/mcp-server/src/tool-config.js:65-65 (registration)Tool config registration mapping 'show_or_hide_view_columns' to the 'view-write' category for profile-based enable/disable.
show_or_hide_view_columns: 'view-write', - packages/extension/src/mcp/tool-profile.ts:72-72 (registration)Extension-side tool category registration, mirrors the server-side mapping for profile management.
show_or_hide_view_columns: 'view-write',