mcp-google-multi 6.0.0-alpha.8 → 6.0.0-alpha.9
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/dist/registry.js +14 -3
- package/package.json +1 -1
package/dist/registry.js
CHANGED
|
@@ -4,6 +4,11 @@ import { isAllowed, writeDisabledResult, IRREVERSIBLE_TOOLS } from './write-cont
|
|
|
4
4
|
import { getAccountSet, refreshAccountSetIfStale } from './accounts.js';
|
|
5
5
|
import { compactResult, trimEnabled } from './trim.js';
|
|
6
6
|
import { fanoutAccountField, invalidAccountsResult, parseAccountSelector, runFanout } from './fanout.js';
|
|
7
|
+
import { MAX_RESPONSE_CHARS } from './executor.js';
|
|
8
|
+
// Client-side result budget advertised for tools that do not declare their own
|
|
9
|
+
// (fat readers do; see trim.ts). ~50k chars stays well inside a default client
|
|
10
|
+
// context limit while leaving room for real list payloads.
|
|
11
|
+
const DEFAULT_MAX_RESULT_CHARS = 50_000;
|
|
7
12
|
const DISCOVERY_MODES = ['lazy', 'curated', 'eager'];
|
|
8
13
|
export function resolveDiscoveryMode(env = process.env) {
|
|
9
14
|
const raw = (env.GOOGLE_DISCOVERY ?? 'lazy').trim();
|
|
@@ -90,9 +95,15 @@ export class ToolRegistry {
|
|
|
90
95
|
// A12: forced per-call human approval on the irreversible set, even in
|
|
91
96
|
// bypass mode. Client-enforced via the wire _meta (Claude Code reads
|
|
92
97
|
// anthropic/* ONLY there); the server verdict stays separate.
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
98
|
+
// Every tool also advertises a result-size budget: fat readers declare
|
|
99
|
+
// their own, everything else inherits the default, so an uncapped tool
|
|
100
|
+
// can never blow past a client's context limit. Generated tools align
|
|
101
|
+
// with the executor's server-side cap.
|
|
102
|
+
const clientMeta = {
|
|
103
|
+
'anthropic/maxResultSizeChars': config.cud !== undefined ? MAX_RESPONSE_CHARS : DEFAULT_MAX_RESULT_CHARS,
|
|
104
|
+
...config._meta,
|
|
105
|
+
...(IRREVERSIBLE_TOOLS.has(name) ? { 'anthropic/requiresUserInteraction': true } : {}),
|
|
106
|
+
};
|
|
96
107
|
// never fan out meta tools: google_api_call infers cud=read but executes writes
|
|
97
108
|
let inputShape = config.inputSchema ?? {};
|
|
98
109
|
let baseHandler = handler;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mcp-google-multi",
|
|
3
|
-
"version": "6.0.0-alpha.
|
|
3
|
+
"version": "6.0.0-alpha.9",
|
|
4
4
|
"description": "Local MCP server for Google Workspace (Gmail, Drive, Calendar, Sheets, Docs, Contacts, Tasks, Meet, Search Console, +Forms/Chat/Admin) across multiple accounts — OAuth-only, encrypted token storage, deny-by-default writes.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|