gogcli-mcp 2.2.0 → 2.4.0
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.
- package/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +1 -1
- package/dist/index.js +4 -2
- package/dist/lib.js +6 -2
- package/manifest.json +1 -1
- package/package.json +1 -1
- package/server.json +2 -2
- package/src/lib.ts +1 -1
- package/src/runner.ts +8 -0
- package/src/tools/gmail.ts +3 -1
- package/tests/tools/gmail.test.ts +7 -0
|
@@ -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.
|
|
10
|
+
"version": "2.4.0"
|
|
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
|
+
"version": "2.4.0",
|
|
19
19
|
"author": {
|
|
20
20
|
"name": "Chris Hall"
|
|
21
21
|
},
|
package/dist/index.js
CHANGED
|
@@ -31961,11 +31961,13 @@ function registerGmailTools(server2) {
|
|
|
31961
31961
|
inputSchema: {
|
|
31962
31962
|
query: external_exports.string().describe("Gmail search query"),
|
|
31963
31963
|
max: external_exports.number().int().optional().describe("Max results to return (default: 10)"),
|
|
31964
|
+
fromContact: external_exports.string().optional().describe("Resolve a Google Contact (name or email) to its addresses and AND a from:(addr OR addr) clause onto the query \u2014 saves looking the contact up first when you only know who, not which address."),
|
|
31964
31965
|
account: accountParam
|
|
31965
31966
|
}
|
|
31966
|
-
}, async ({ query, max, account }) => {
|
|
31967
|
+
}, async ({ query, max, fromContact, account }) => {
|
|
31967
31968
|
const args = ["gmail", "search", query];
|
|
31968
31969
|
if (max !== void 0) args.push(`--max=${max}`);
|
|
31970
|
+
if (fromContact) args.push(`--from-contact=${fromContact}`);
|
|
31969
31971
|
return runOrDiagnose(args, { account });
|
|
31970
31972
|
});
|
|
31971
31973
|
server2.registerTool("gog_gmail_get", {
|
|
@@ -32322,7 +32324,7 @@ function registerTasksTools(server2) {
|
|
|
32322
32324
|
}
|
|
32323
32325
|
|
|
32324
32326
|
// src/server.ts
|
|
32325
|
-
var VERSION = true ? "2.
|
|
32327
|
+
var VERSION = true ? "2.4.0" : "0.0.0";
|
|
32326
32328
|
function createServer(options) {
|
|
32327
32329
|
return new McpServer({
|
|
32328
32330
|
name: options?.name ?? "gogcli",
|
package/dist/lib.js
CHANGED
|
@@ -30859,6 +30859,7 @@ var EMPTY_COMPLETION_RESULT = {
|
|
|
30859
30859
|
import { spawn } from "node:child_process";
|
|
30860
30860
|
import { delimiter } from "node:path";
|
|
30861
30861
|
var TIMEOUT_MS = 3e4;
|
|
30862
|
+
var MIN_GOG_VERSION = "0.20.0";
|
|
30862
30863
|
function envOrUndefined(key) {
|
|
30863
30864
|
const value = process.env[key];
|
|
30864
30865
|
if (!value || value.startsWith("${")) return void 0;
|
|
@@ -31873,11 +31874,13 @@ function registerGmailTools(server) {
|
|
|
31873
31874
|
inputSchema: {
|
|
31874
31875
|
query: external_exports.string().describe("Gmail search query"),
|
|
31875
31876
|
max: external_exports.number().int().optional().describe("Max results to return (default: 10)"),
|
|
31877
|
+
fromContact: external_exports.string().optional().describe("Resolve a Google Contact (name or email) to its addresses and AND a from:(addr OR addr) clause onto the query \u2014 saves looking the contact up first when you only know who, not which address."),
|
|
31876
31878
|
account: accountParam
|
|
31877
31879
|
}
|
|
31878
|
-
}, async ({ query, max, account }) => {
|
|
31880
|
+
}, async ({ query, max, fromContact, account }) => {
|
|
31879
31881
|
const args = ["gmail", "search", query];
|
|
31880
31882
|
if (max !== void 0) args.push(`--max=${max}`);
|
|
31883
|
+
if (fromContact) args.push(`--from-contact=${fromContact}`);
|
|
31881
31884
|
return runOrDiagnose(args, { account });
|
|
31882
31885
|
});
|
|
31883
31886
|
server.registerTool("gog_gmail_get", {
|
|
@@ -32234,7 +32237,7 @@ function registerTasksTools(server) {
|
|
|
32234
32237
|
}
|
|
32235
32238
|
|
|
32236
32239
|
// src/server.ts
|
|
32237
|
-
var VERSION = true ? "2.
|
|
32240
|
+
var VERSION = true ? "2.4.0" : "0.0.0";
|
|
32238
32241
|
function createServer(options) {
|
|
32239
32242
|
return new McpServer({
|
|
32240
32243
|
name: options?.name ?? "gogcli",
|
|
@@ -32256,6 +32259,7 @@ function createBaseServer(options) {
|
|
|
32256
32259
|
return server;
|
|
32257
32260
|
}
|
|
32258
32261
|
export {
|
|
32262
|
+
MIN_GOG_VERSION,
|
|
32259
32263
|
VERSION,
|
|
32260
32264
|
accountParam,
|
|
32261
32265
|
createBaseServer,
|
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.
|
|
6
|
+
"version": "2.4.0",
|
|
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
package/server.json
CHANGED
|
@@ -7,12 +7,12 @@
|
|
|
7
7
|
"source": "github",
|
|
8
8
|
"subfolder": "packages/gogcli-mcp"
|
|
9
9
|
},
|
|
10
|
-
"version": "2.
|
|
10
|
+
"version": "2.4.0",
|
|
11
11
|
"packages": [
|
|
12
12
|
{
|
|
13
13
|
"registryType": "npm",
|
|
14
14
|
"identifier": "gogcli-mcp",
|
|
15
|
-
"version": "2.
|
|
15
|
+
"version": "2.4.0",
|
|
16
16
|
"transport": {
|
|
17
17
|
"type": "stdio"
|
|
18
18
|
},
|
package/src/lib.ts
CHANGED
|
@@ -13,7 +13,7 @@ export {
|
|
|
13
13
|
registerSlidesTools,
|
|
14
14
|
registerTasksTools,
|
|
15
15
|
} from './server.js';
|
|
16
|
-
export { run } from './runner.js';
|
|
16
|
+
export { run, MIN_GOG_VERSION } from './runner.js';
|
|
17
17
|
export type { RunOptions, Spawner } from './runner.js';
|
|
18
18
|
export {
|
|
19
19
|
accountParam,
|
package/src/runner.ts
CHANGED
|
@@ -17,6 +17,14 @@ export interface RunOptions {
|
|
|
17
17
|
|
|
18
18
|
const TIMEOUT_MS = 30_000;
|
|
19
19
|
|
|
20
|
+
// Minimum gogcli (`gog`) binary version this wrapper's tools assume. Some tools
|
|
21
|
+
// pass flags/subcommands that only exist in newer gog, so bump this whenever a
|
|
22
|
+
// change starts relying on a newer gog feature — and label that PR `gogcli-bump`
|
|
23
|
+
// so the requirement change is surfaced in the release notes (see
|
|
24
|
+
// .github/release.yml). This is the single source of truth for the required
|
|
25
|
+
// version; keep the README/CLAUDE.md mention in sync.
|
|
26
|
+
export const MIN_GOG_VERSION = '0.20.0';
|
|
27
|
+
|
|
20
28
|
// Treat unresolved .mcpb placeholders ("${user_config.gog_path}") and empty
|
|
21
29
|
// strings the same as an unset env var. When an optional .mcpb user_config
|
|
22
30
|
// field is left blank, some clients pass the literal placeholder text through
|
package/src/tools/gmail.ts
CHANGED
|
@@ -9,11 +9,13 @@ export function registerGmailTools(server: McpServer): void {
|
|
|
9
9
|
inputSchema: {
|
|
10
10
|
query: z.string().describe('Gmail search query'),
|
|
11
11
|
max: z.number().int().optional().describe('Max results to return (default: 10)'),
|
|
12
|
+
fromContact: z.string().optional().describe('Resolve a Google Contact (name or email) to its addresses and AND a from:(addr OR addr) clause onto the query — saves looking the contact up first when you only know who, not which address.'),
|
|
12
13
|
account: accountParam,
|
|
13
14
|
},
|
|
14
|
-
}, async ({ query, max, account }) => {
|
|
15
|
+
}, async ({ query, max, fromContact, account }) => {
|
|
15
16
|
const args = ['gmail', 'search', query];
|
|
16
17
|
if (max !== undefined) args.push(`--max=${max}`);
|
|
18
|
+
if (fromContact) args.push(`--from-contact=${fromContact}`);
|
|
17
19
|
return runOrDiagnose(args, { account });
|
|
18
20
|
});
|
|
19
21
|
|
|
@@ -30,6 +30,13 @@ describe('gog_gmail_search', () => {
|
|
|
30
30
|
const result = await handlers.get('gog_gmail_search')!({ query: 'test' });
|
|
31
31
|
expect(result.content[0].text).toBe('Error: Search failed');
|
|
32
32
|
});
|
|
33
|
+
|
|
34
|
+
it('appends --from-contact flag when provided', async () => {
|
|
35
|
+
vi.mocked(runner.run).mockResolvedValue('{}');
|
|
36
|
+
const handlers = setupHandlers();
|
|
37
|
+
await handlers.get('gog_gmail_search')!({ query: 'subject:invoice', fromContact: 'Alice' });
|
|
38
|
+
expect(runner.run).toHaveBeenCalledWith(['gmail', 'search', 'subject:invoice', '--from-contact=Alice'], { account: undefined });
|
|
39
|
+
});
|
|
33
40
|
});
|
|
34
41
|
|
|
35
42
|
describe('gog_gmail_get', () => {
|