From 8742e4697fb6d08ac6dd046a5896bb417f157807 Mon Sep 17 00:00:00 2001 From: Shern Jauhal Date: Wed, 19 Aug 2026 10:39:46 -0700 Subject: [PATCH] Just Code --- docs/docs/configuration/mcp-config/env-vars.md | 2 +- src/server/oauth/scopes.ts | 13 +++++++++---- src/tools/web/toolName.ts | 7 ++++--- src/tools/web/tools.ts | 10 ++++++---- 4 files changed, 20 insertions(+), 12 deletions(-) diff --git a/docs/docs/configuration/mcp-config/env-vars.md b/docs/docs/configuration/mcp-config/env-vars.md index 6c8f04bfa..77e040985 100644 --- a/docs/docs/configuration/mcp-config/env-vars.md +++ b/docs/docs/configuration/mcp-config/env-vars.md @@ -698,7 +698,7 @@ instead of inlining it: - `get-view-image` / `get-custom-view-image` — rendered image (otherwise inline base64) - `get-view-data` / `get-custom-view-data` — CSV data (otherwise inline text) - `download-workbook` — workbook file (otherwise a local temp-file path) -- `request-workbook-upload` / `validate-upload-and-publish-workbook`— stage workbook in S3 before publishing (otherwise a local file path) +- `request-upload` / `finalize-upload` — presign, upload, and verify an object in S3; `publish-workbook` then publishes it (otherwise a local file path) The client fetches the files directly from S3, so the payload never streams back through the MCP server on read. diff --git a/src/server/oauth/scopes.ts b/src/server/oauth/scopes.ts index de1c7e68f..7c564fcb7 100644 --- a/src/server/oauth/scopes.ts +++ b/src/server/oauth/scopes.ts @@ -184,11 +184,15 @@ const toolScopeMap: Record< mcp: ['tableau:mcp:workbook:read'], api: new Set(['tableau:content:read', 'tableau:mcp_site_settings:read']), }, - 'request-workbook-upload': { + 'request-upload': { mcp: ['tableau:mcp:workbook:create'], api: new Set([]), }, - 'validate-upload-and-publish-workbook': { + 'finalize-upload': { + mcp: ['tableau:mcp:workbook:create'], + api: new Set([]), + }, + 'publish-workbook': { mcp: ['tableau:mcp:workbook:create'], api: new Set(['tableau:workbooks:create']), }, @@ -425,8 +429,9 @@ async function getEnabledToolNames(): Promise> { } if (!authoringToolsEnabled) { - enabledTools.delete('request-workbook-upload'); - enabledTools.delete('validate-upload-and-publish-workbook'); + enabledTools.delete('request-upload'); + enabledTools.delete('finalize-upload'); + enabledTools.delete('publish-workbook'); } return enabledTools; diff --git a/src/tools/web/toolName.ts b/src/tools/web/toolName.ts index 2c2dac71c..dd89b3d54 100644 --- a/src/tools/web/toolName.ts +++ b/src/tools/web/toolName.ts @@ -6,8 +6,9 @@ export const webToolNames = [ 'list-jobs', 'list-users', 'list-workbooks', - 'request-workbook-upload', - 'validate-upload-and-publish-workbook', + 'request-upload', + 'finalize-upload', + 'publish-workbook', 'list-projects', 'list-views', 'list-custom-views', @@ -68,7 +69,7 @@ export type WebToolGroupName = (typeof webToolGroupNames)[number]; export const webToolGroups = { datasource: ['list-datasources', 'get-datasource-metadata', 'query-datasource'], workbook: ['list-workbooks', 'get-workbook', 'download-workbook'], - authoring: ['request-workbook-upload', 'validate-upload-and-publish-workbook'], + authoring: ['request-upload', 'finalize-upload', 'publish-workbook'], project: ['list-projects'], view: [ 'list-views', diff --git a/src/tools/web/tools.ts b/src/tools/web/tools.ts index db8535510..61ac0fdff 100644 --- a/src/tools/web/tools.ts +++ b/src/tools/web/tools.ts @@ -27,6 +27,8 @@ import { getRecordEventTool } from './recordEvent/recordEvent.js'; import { getRenderInteractiveVizTool } from './renderInteractiveViz/renderInteractiveViz.js'; import { getResetConsentTool } from './resetConsent/resetConsent.js'; import { getRevokeAccessTokenTool } from './revokeAccessToken/revokeAccessToken.js'; +import { getFinalizeUploadTool } from './uploads/finalizeUpload.js'; +import { getRequestUploadTool } from './uploads/requestUpload.js'; import { getListUsersTool } from './users/listUsers.js'; import { getUpdateUserTool } from './users/updateUser.js'; import { getGetCustomViewDataTool } from './views/getCustomViewData.js'; @@ -39,8 +41,7 @@ import { getListViewsTool } from './views/listViews.js'; import { getDownloadWorkbookTool } from './workbooks/downloadWorkbook.js'; import { getGetWorkbookTool } from './workbooks/getWorkbook.js'; import { getListWorkbooksTool } from './workbooks/listWorkbooks.js'; -import { getRequestWorkbookUploadTool } from './workbooks/requestWorkbookUpload.js'; -import { getValidateUploadAndPublishWorkbookTool } from './workbooks/validateUploadAndPublishWorkbook.js'; +import { getPublishWorkbookTool } from './workbooks/publishWorkbook.js'; export const webToolFactories = [ getGetDatasourceMetadataTool, @@ -69,8 +70,9 @@ export const webToolFactories = [ getGenerateInsightCardsTool, getDownloadWorkbookTool, getGetWorkbookTool, - getRequestWorkbookUploadTool, - getValidateUploadAndPublishWorkbookTool, + getRequestUploadTool, + getFinalizeUploadTool, + getPublishWorkbookTool, getGetViewTool, getGetViewDataTool, getGetViewImageTool,