Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@tableau/mcp-server",
"description": "Helping agents see and understand data.",
"version": "2.68.2",
"version": "2.68.3",
"repository": {
"type": "git",
"url": "git+https://github.com/tableau/tableau-mcp.git"
Expand Down
32 changes: 32 additions & 0 deletions src/desktop/limits/inlineImageCap.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import { buildInlineImageCapFileMessage } from './inlineImageCap.js';

describe('buildInlineImageCapFileMessage', () => {
it('keeps the export-image next step and discloses manual cache-file removal by default', () => {
const message = buildInlineImageCapFileMessage({
label: 'Worksheet',
bytes: 9,
capBytes: 8,
file: '/tmp/worksheet-image.png',
});

expect(message).toContain('worksheet instead of a whole dashboard');
expect(message).toContain('pass a filePath');
expect(message).toContain('remains until manually removed');
});

it('uses a capture-specific next step without unsupported export parameters', () => {
const message = buildInlineImageCapFileMessage({
label: 'Window screenshot (1440x900)',
bytes: 9,
capBytes: 8,
file: '/tmp/window-screenshot.png',
nextStep:
'Open the file to view the full resolution screenshot. This local cache file remains until manually removed.',
});

expect(message).toContain('full resolution screenshot');
expect(message).toContain('remains until manually removed');
expect(message).not.toContain('filePath');
expect(message).not.toContain('worksheet');
});
});
11 changes: 7 additions & 4 deletions src/desktop/limits/inlineImageCap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,20 @@ export function buildInlineImageCapFileMessage(params: {
bytes: number;
capBytes: number;
file: string;
nextStep?: string;
}): string {
const { label, bytes, capBytes, file } = params;
const { label, bytes, capBytes, file, nextStep } = params;
return [
`${label} image is ${bytes} bytes, over the ${capBytes}-byte inline cap. Written to a file ` +
'instead of returned inline to keep large images out of the conversation.',
'',
`Image file: ${file}`,
'',
'Open the file to view the image. To get a smaller inline image next time, request a ' +
'worksheet instead of a whole dashboard, or pass a filePath to have Tableau write the ' +
'image directly to a location of your choosing.',
nextStep ??
'Open the file to view the image. This local cache file remains until manually removed. ' +
'To get a smaller inline image next time, request a worksheet instead of a whole ' +
'dashboard, or pass a filePath to have Tableau write the image directly to a location ' +
'of your choosing.',
].join('\n');
}

Expand Down
Loading
Loading