gogcli-mcp 2.18.2 → 2.18.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,7 +7,7 @@
7
7
  },
8
8
  "metadata": {
9
9
  "description": "Google Sheets (and more) for Claude via gogcli — read, write, and manage spreadsheets",
10
- "version": "2.18.2"
10
+ "version": "2.18.3"
11
11
  },
12
12
  "plugins": [
13
13
  {
@@ -15,7 +15,7 @@
15
15
  "displayName": "gogcli",
16
16
  "source": "./",
17
17
  "description": "Google Sheets (and more) for Claude via gogcli — read, write, and manage spreadsheets",
18
- "version": "2.18.2",
18
+ "version": "2.18.3",
19
19
  "author": {
20
20
  "name": "Chris Hall"
21
21
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "gogcli-mcp",
3
3
  "displayName": "gogcli",
4
- "version": "2.18.2",
4
+ "version": "2.18.3",
5
5
  "description": "Google Sheets (and more) for Claude via gogcli — read, write, and manage spreadsheets",
6
6
  "author": {
7
7
  "name": "Chris Hall",
package/dist/index.js CHANGED
@@ -32457,14 +32457,16 @@ function registerDriveTools(server) {
32457
32457
  const { name, mimeType } = fileMeta(await run(["drive", "get", fileId], { account }));
32458
32458
  const params = JSON.stringify({ fileId, alt: "media" });
32459
32459
  const blob = await runBinary(["api", "call", "drive", "v3", "files.get", `--params=${params}`], { account });
32460
+ const type = mimeType ?? "application/octet-stream";
32461
+ const unrenderableHint = type.startsWith("image/") ? "" : ` If your client does not render a ${type} resource, gog_drive_extract_text returns the same file as text (PDFs included, via OCR).`;
32460
32462
  return {
32461
32463
  content: [
32462
- { type: "text", text: `${name ?? fileId} (${mimeType ?? "application/octet-stream"}) \u2014 ${Buffer.from(blob, "base64").length} bytes, base64 resource below.` },
32464
+ { type: "text", text: `${name ?? fileId} (${type}) \u2014 ${Buffer.from(blob, "base64").length} bytes, base64 resource below.${unrenderableHint}` },
32463
32465
  {
32464
32466
  type: "resource",
32465
32467
  resource: {
32466
32468
  uri: `gogdrive://${fileId}/${encodeURIComponent(name ?? "file")}`,
32467
- mimeType: mimeType ?? "application/octet-stream",
32469
+ mimeType: type,
32468
32470
  blob
32469
32471
  }
32470
32472
  }
@@ -32857,7 +32859,7 @@ function registerTasksTools(server) {
32857
32859
  }
32858
32860
 
32859
32861
  // src/server.ts
32860
- var VERSION = true ? "2.18.2" : "0.0.0";
32862
+ var VERSION = true ? "2.18.3" : "0.0.0";
32861
32863
  var BASE_TOOL_REGISTRARS = [
32862
32864
  registerApiTools,
32863
32865
  registerAuthTools,
package/dist/lib.js CHANGED
@@ -24363,14 +24363,16 @@ function registerDriveTools(server) {
24363
24363
  const { name, mimeType } = fileMeta(await run(["drive", "get", fileId], { account }));
24364
24364
  const params = JSON.stringify({ fileId, alt: "media" });
24365
24365
  const blob = await runBinary(["api", "call", "drive", "v3", "files.get", `--params=${params}`], { account });
24366
+ const type = mimeType ?? "application/octet-stream";
24367
+ const unrenderableHint = type.startsWith("image/") ? "" : ` If your client does not render a ${type} resource, gog_drive_extract_text returns the same file as text (PDFs included, via OCR).`;
24366
24368
  return {
24367
24369
  content: [
24368
- { type: "text", text: `${name ?? fileId} (${mimeType ?? "application/octet-stream"}) \u2014 ${Buffer.from(blob, "base64").length} bytes, base64 resource below.` },
24370
+ { type: "text", text: `${name ?? fileId} (${type}) \u2014 ${Buffer.from(blob, "base64").length} bytes, base64 resource below.${unrenderableHint}` },
24369
24371
  {
24370
24372
  type: "resource",
24371
24373
  resource: {
24372
24374
  uri: `gogdrive://${fileId}/${encodeURIComponent(name ?? "file")}`,
24373
- mimeType: mimeType ?? "application/octet-stream",
24375
+ mimeType: type,
24374
24376
  blob
24375
24377
  }
24376
24378
  }
@@ -24763,7 +24765,7 @@ function registerTasksTools(server) {
24763
24765
  }
24764
24766
 
24765
24767
  // src/server.ts
24766
- var VERSION = true ? "2.18.2" : "0.0.0";
24768
+ var VERSION = true ? "2.18.3" : "0.0.0";
24767
24769
  var BASE_TOOL_REGISTRARS = [
24768
24770
  registerApiTools,
24769
24771
  registerAuthTools,
package/manifest.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "manifest_version": "0.3",
4
4
  "name": "gogcli-mcp",
5
5
  "display_name": "gogcli",
6
- "version": "2.18.2",
6
+ "version": "2.18.3",
7
7
  "description": "Google Sheets (and more) for Claude via gogcli — read, write, and manage spreadsheets",
8
8
  "author": {
9
9
  "name": "Chris Hall",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gogcli-mcp",
3
- "version": "2.18.2",
3
+ "version": "2.18.3",
4
4
  "mcpName": "io.github.chrischall/gogcli-mcp",
5
5
  "description": "MCP server wrapping gogcli for Google service access",
6
6
  "author": "Claude Code (AI) <https://www.anthropic.com/claude>",
package/server.json CHANGED
@@ -7,12 +7,12 @@
7
7
  "source": "github",
8
8
  "subfolder": "packages/gogcli-mcp"
9
9
  },
10
- "version": "2.18.2",
10
+ "version": "2.18.3",
11
11
  "packages": [
12
12
  {
13
13
  "registryType": "npm",
14
14
  "identifier": "gogcli-mcp",
15
- "version": "2.18.2",
15
+ "version": "2.18.3",
16
16
  "transport": {
17
17
  "type": "stdio"
18
18
  },
@@ -221,14 +221,24 @@ export function registerDriveTools(server: McpServer): void {
221
221
  const { name, mimeType } = fileMeta(await run(['drive', 'get', fileId], { account }));
222
222
  const params = JSON.stringify({ fileId, alt: 'media' });
223
223
  const blob = await runBinary(['api', 'call', 'drive', 'v3', 'files.get', `--params=${params}`], { account });
224
+ const type = mimeType ?? 'application/octet-stream';
225
+ // Several hosts (claude.ai among them) render embedded IMAGE resources
226
+ // and reject every other type outright — "Resources of type
227
+ // 'application/pdf' are not currently supported". The fetch succeeded and
228
+ // the bytes are right here, but the caller sees only the text block, so
229
+ // that text has to carry the way out rather than end on "resource below".
230
+ const unrenderableHint = type.startsWith('image/')
231
+ ? ''
232
+ : ` If your client does not render a ${type} resource, gog_drive_extract_text`
233
+ + ' returns the same file as text (PDFs included, via OCR).';
224
234
  return {
225
235
  content: [
226
- { type: 'text', text: `${name ?? fileId} (${mimeType ?? 'application/octet-stream'}) — ${Buffer.from(blob, 'base64').length} bytes, base64 resource below.` },
236
+ { type: 'text', text: `${name ?? fileId} (${type}) — ${Buffer.from(blob, 'base64').length} bytes, base64 resource below.${unrenderableHint}` },
227
237
  {
228
238
  type: 'resource',
229
239
  resource: {
230
240
  uri: `gogdrive://${fileId}/${encodeURIComponent(name ?? 'file')}`,
231
- mimeType: mimeType ?? 'application/octet-stream',
241
+ mimeType: type,
232
242
  blob,
233
243
  },
234
244
  },
package/src/worker.ts CHANGED
@@ -38,7 +38,7 @@ import { gogAuth, type GogProps } from './connector-auth.js';
38
38
  // connector with all ~360 tools at once. Add whichever paths you want as separate
39
39
  // connectors in claude.ai (each authorizes with the same connector key).
40
40
 
41
- const VERSION = '2.18.2'; // x-release-please-version
41
+ const VERSION = '2.18.3'; // x-release-please-version
42
42
 
43
43
  // Build an McpAgent subclass whose init() registers `registrars` onto its server,
44
44
  // each handler wrapped in the ALS scope carrying the per-session Fly executor.
@@ -371,6 +371,25 @@ describe('gog_drive_read_bytes', () => {
371
371
  );
372
372
  });
373
373
 
374
+ it('names the text fallback when the resource type is one hosts refuse to render', async () => {
375
+ // The bytes arrive fine; some hosts just drop a non-image embedded resource
376
+ // ("Resources of type 'application/pdf' are not currently supported"), and
377
+ // then the text block is all the caller gets.
378
+ vi.mocked(runner.run).mockResolvedValueOnce(JSON.stringify({ file: { name: 'a.pdf', mimeType: 'application/pdf' } }));
379
+ vi.mocked(runner.runBinary).mockResolvedValueOnce(Buffer.from('%PDF-1.4').toString('base64'));
380
+ const harness = await setupHandlers();
381
+ const result = await harness.callTool('gog_drive_read_bytes', { fileId: 'f1' });
382
+ expect(result.content[0].text).toContain('gog_drive_extract_text');
383
+ });
384
+
385
+ it('does not add the fallback hint for an image, which hosts do render', async () => {
386
+ vi.mocked(runner.run).mockResolvedValueOnce(JSON.stringify({ file: { name: 'a.png', mimeType: 'image/png' } }));
387
+ vi.mocked(runner.runBinary).mockResolvedValueOnce(Buffer.from('x').toString('base64'));
388
+ const harness = await setupHandlers();
389
+ const result = await harness.callTool('gog_drive_read_bytes', { fileId: 'f3' });
390
+ expect(result.content[0].text).not.toContain('gog_drive_extract_text');
391
+ });
392
+
374
393
  it('falls back to octet-stream and "file" when metadata lacks name/mime', async () => {
375
394
  vi.mocked(runner.run).mockResolvedValueOnce('{}');
376
395
  vi.mocked(runner.runBinary).mockResolvedValueOnce(Buffer.from('x').toString('base64'));