gogcli-mcp-sheets 4.6.1 → 4.6.2

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": "Extended Google Sheets for Claude via gogcli — auth + full Sheets support",
10
- "version": "4.6.1"
10
+ "version": "4.6.2"
11
11
  },
12
12
  "plugins": [
13
13
  {
@@ -15,7 +15,7 @@
15
15
  "displayName": "gogcli (Sheets)",
16
16
  "source": "./",
17
17
  "description": "Extended Google Sheets for Claude via gogcli — auth + full Sheets support",
18
- "version": "4.6.1",
18
+ "version": "4.6.2",
19
19
  "author": {
20
20
  "name": "Chris Hall"
21
21
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "gogcli-mcp-sheets",
3
3
  "displayName": "gogcli (Sheets)",
4
- "version": "4.6.1",
4
+ "version": "4.6.2",
5
5
  "description": "Extended Google Sheets for Claude via gogcli — auth + full Sheets support",
6
6
  "author": {
7
7
  "name": "Chris Hall",
package/dist/index.js CHANGED
@@ -19790,7 +19790,7 @@ function date4(params) {
19790
19790
  return _coercedDate(ZodDate, params);
19791
19791
  }
19792
19792
 
19793
- // ../../node_modules/@modelcontextprotocol/server/node_modules/@modelcontextprotocol/core/dist/auth-CGP0BDVq.mjs
19793
+ // ../../node_modules/@modelcontextprotocol/core/dist/auth-BNDyLTqp.mjs
19794
19794
  var LATEST_PROTOCOL_VERSION = "2025-11-25";
19795
19795
  var SUPPORTED_PROTOCOL_VERSIONS = [
19796
19796
  LATEST_PROTOCOL_VERSION,
@@ -20679,7 +20679,8 @@ var OAuthTokensSchema = object({
20679
20679
  token_type: string2(),
20680
20680
  expires_in: coerce_exports.number().optional(),
20681
20681
  scope: string2().optional(),
20682
- refresh_token: string2().optional()
20682
+ refresh_token: string2().optional(),
20683
+ issuer: string2().optional().catch(void 0)
20683
20684
  }).strip();
20684
20685
  var IdJagTokenExchangeResponseSchema = object({
20685
20686
  issued_token_type: literal("urn:ietf:params:oauth:token-type:id-jag"),
@@ -20717,7 +20718,8 @@ var OAuthClientInformationSchema = object({
20717
20718
  client_id: string2(),
20718
20719
  client_secret: string2().optional(),
20719
20720
  client_id_issued_at: number2().optional(),
20720
- client_secret_expires_at: number2().optional()
20721
+ client_secret_expires_at: number2().optional(),
20722
+ issuer: string2().optional().catch(void 0)
20721
20723
  }).strip();
20722
20724
  var OAuthClientInformationFullSchema = OAuthClientMetadataSchema.merge(OAuthClientInformationSchema);
20723
20725
  var OAuthClientRegistrationErrorSchema = object({
@@ -20729,7 +20731,7 @@ var OAuthTokenRevocationRequestSchema = object({
20729
20731
  token_type_hint: string2().optional()
20730
20732
  }).strip();
20731
20733
 
20732
- // ../../node_modules/@modelcontextprotocol/server/dist/src-D-y6h4N7.mjs
20734
+ // ../../node_modules/@modelcontextprotocol/server/dist/src-Cqbh3MYc.mjs
20733
20735
  var BRANDS = /* @__PURE__ */ Symbol.for("mcp.sdk.errorBrands");
20734
20736
  function stampErrorBrands(instance, ctor) {
20735
20737
  const brands = /* @__PURE__ */ new Set();
@@ -22972,7 +22974,8 @@ function build() {
22972
22974
  ListResourceTemplatesResultResponseSchema: wireResultResponse(ListResourceTemplatesResultSchema$1),
22973
22975
  ReadResourceResultResponseSchema: wireResultResponse(union([ReadResourceResultSchema$1, InputRequiredResultSchema])),
22974
22976
  CompleteResultResponseSchema: wireResultResponse(CompleteResultSchema$1),
22975
- DiscoverResultResponseSchema: wireResultResponse(DiscoverResultSchema$1)
22977
+ DiscoverResultResponseSchema: wireResultResponse(DiscoverResultSchema$1),
22978
+ SubscriptionsListenResultResponseSchema: wireResultResponse(SubscriptionsListenResultSchema$1)
22976
22979
  };
22977
22980
  }
22978
22981
  var memo2;
@@ -23400,6 +23403,8 @@ var rev2026Codec = {
23400
23403
  const rawInputRequests = raw["inputRequests"];
23401
23404
  const inputRequests = isPlainObject$4(rawInputRequests) ? rawInputRequests : {};
23402
23405
  const requestState = raw["requestState"];
23406
+ const metaParse = raw["_meta"] === void 0 ? void 0 : buildSchemas2026().ResultMetaSchema.safeParse(raw["_meta"]);
23407
+ const meta3 = metaParse?.success ? metaParse.data : void 0;
23403
23408
  if (Object.keys(inputRequests).length === 0 && typeof requestState !== "string") return {
23404
23409
  kind: "invalid",
23405
23410
  error: new SdkError(SdkErrorCode.InvalidResult, `Invalid result for ${method}: input_required carries neither inputRequests nor requestState (every input_required result must include at least one of the two)`, {
@@ -23410,7 +23415,8 @@ var rev2026Codec = {
23410
23415
  return {
23411
23416
  kind: "input_required",
23412
23417
  inputRequests,
23413
- ...typeof requestState === "string" && { requestState }
23418
+ ...typeof requestState === "string" && { requestState },
23419
+ ...meta3 !== void 0 && { _meta: meta3 }
23414
23420
  };
23415
23421
  }
23416
23422
  if (rawResultType !== "complete") return {
@@ -23477,6 +23483,9 @@ function isSpecRequestMethod(method) {
23477
23483
  function isSpecNotificationMethod(method) {
23478
23484
  return ALL_CODECS.some((codec2) => codec2.hasNotificationMethod(method));
23479
23485
  }
23486
+ function isExtensionReusedRequestMethod(method) {
23487
+ return method === "tasks/get" || method === "tasks/cancel";
23488
+ }
23480
23489
  var ALL_CODECS = [rev2025Codec, rev2026Codec];
23481
23490
  function isPlainObject$3(value) {
23482
23491
  return value !== null && typeof value === "object" && !Array.isArray(value);
@@ -24485,6 +24494,8 @@ var Protocol = class {
24485
24494
  _transport;
24486
24495
  _requestMessageId = 0;
24487
24496
  _requestHandlers = /* @__PURE__ */ new Map();
24497
+ /** Methods registered with an explicit schema; the era gate in `_onrequest` reads it for the Tasks extension names. */
24498
+ _customSchemaRequestMethods = /* @__PURE__ */ new Set();
24488
24499
  _requestHandlerAbortControllers = /* @__PURE__ */ new Map();
24489
24500
  _notificationHandlers = /* @__PURE__ */ new Map();
24490
24501
  _responseHandlers = /* @__PURE__ */ new Map();
@@ -24768,7 +24779,7 @@ var Protocol = class {
24768
24779
  return;
24769
24780
  }
24770
24781
  }
24771
- if (isSpecRequestMethod(request.method) && !codec2.hasRequestMethod(request.method)) {
24782
+ if (isSpecRequestMethod(request.method) && !codec2.hasRequestMethod(request.method) && !(isExtensionReusedRequestMethod(request.method) && this._customSchemaRequestMethods.has(request.method))) {
24772
24783
  sendErrorResponse(ProtocolErrorCode.MethodNotFound, "Method not found");
24773
24784
  return;
24774
24785
  }
@@ -24901,8 +24912,11 @@ var Protocol = class {
24901
24912
  }
24902
24913
  request(request, schemaOrOptions, maybeOptions) {
24903
24914
  const codec2 = this._resolveOutboundCodec(request.method);
24915
+ if (isStandardSchema(schemaOrOptions)) {
24916
+ if (!isExtensionReusedRequestMethod(request.method)) this._assertOutboundRequestInEra(codec2, request.method);
24917
+ return this._requestWithSchemaViaCodec(codec2, request, schemaOrOptions, maybeOptions);
24918
+ }
24904
24919
  this._assertOutboundRequestInEra(codec2, request.method);
24905
- if (isStandardSchema(schemaOrOptions)) return this._requestWithSchemaViaCodec(codec2, request, schemaOrOptions, maybeOptions);
24906
24920
  const validate2 = codecResultValidator(codec2, request.method);
24907
24921
  if (validate2 === void 0) throw new TypeError(`'${request.method}' is not a spec method; pass a result schema as the second argument to request().`);
24908
24922
  return this._requestWithSchemaViaCodec(codec2, request, validate2, schemaOrOptions);
@@ -25095,7 +25109,7 @@ var Protocol = class {
25095
25109
  * Emits a notification, which is a one-way message that does not expect a response.
25096
25110
  */
25097
25111
  async notification(notification, options) {
25098
- return this._notificationViaCodec(this._resolveOutboundCodec(notification.method), notification, options);
25112
+ return await this._notificationViaCodec(this._resolveOutboundCodec(notification.method), notification, options);
25099
25113
  }
25100
25114
  /**
25101
25115
  * The notification funnel proper, keyed by the resolved era codec —
@@ -25146,6 +25160,8 @@ var Protocol = class {
25146
25160
  return maybeHandler(parsed.data, ctx);
25147
25161
  };
25148
25162
  else throw new TypeError("setRequestHandler: handler is required");
25163
+ if (typeof schemasOrHandler === "function") this._customSchemaRequestMethods.delete(method);
25164
+ else this._customSchemaRequestMethods.add(method);
25149
25165
  this._requestHandlers.set(method, this._wrapHandler(method, stored));
25150
25166
  }
25151
25167
  /**
@@ -25175,6 +25191,7 @@ var Protocol = class {
25175
25191
  */
25176
25192
  removeRequestHandler(method) {
25177
25193
  this._requestHandlers.delete(method);
25194
+ this._customSchemaRequestMethods.delete(method);
25178
25195
  }
25179
25196
  /**
25180
25197
  * Asserts that a request handler has not already been set for the given method, in preparation for a new one being automatically installed.
@@ -25252,7 +25269,8 @@ function manualInputRequiredValue(decoded) {
25252
25269
  return {
25253
25270
  resultType: "input_required",
25254
25271
  inputRequests: decoded.inputRequests,
25255
- ...decoded.requestState !== void 0 && { requestState: decoded.requestState }
25272
+ ...decoded.requestState !== void 0 && { requestState: decoded.requestState },
25273
+ ...decoded._meta !== void 0 && { _meta: decoded._meta }
25256
25274
  };
25257
25275
  }
25258
25276
  var require_content_type = /* @__PURE__ */ __commonJSMin(((exports) => {
@@ -32416,7 +32434,7 @@ var Ajv = import_ajv.Ajv;
32416
32434
  // ../../node_modules/@modelcontextprotocol/server/dist/shimsNode.mjs
32417
32435
  import process2 from "node:process";
32418
32436
 
32419
- // ../../node_modules/@modelcontextprotocol/server/dist/mcp-Dw2OlZ1f.mjs
32437
+ // ../../node_modules/@modelcontextprotocol/server/dist/mcp-DIH4cS6P.mjs
32420
32438
  var COMPLETABLE_SYMBOL = /* @__PURE__ */ Symbol.for("mcp.completable");
32421
32439
  function isCompletable(schema) {
32422
32440
  return !!schema && typeof schema === "object" && COMPLETABLE_SYMBOL in schema;
@@ -32481,7 +32499,7 @@ var StdioListenRouter = class {
32481
32499
  _serverCapabilities;
32482
32500
  /**
32483
32501
  * The serving instance's identity, stamped onto the graceful-close
32484
- * results' `_meta` (the spec's `SubscriptionsListenResultMeta` extends
32502
+ * results' `_meta` (the spec's `SubscriptionsListenResultMetaObject` extends
32485
32503
  * `ResultMetaObject`). Handed over together with the capabilities.
32486
32504
  */
32487
32505
  _serverInfo;
@@ -32813,6 +32831,11 @@ var Server = class extends Protocol {
32813
32831
  if (modernProtocolVersions(this._supportedProtocolVersions).length > 0) this.setRequestHandler("server/discover", () => this._ondiscover());
32814
32832
  if (this._capabilities.logging) this._registerLoggingHandler();
32815
32833
  }
32834
+ /** Attaches to the given transport; rejects while this instance is connected to another one. */
32835
+ async connect(transport) {
32836
+ if (this.transport !== void 0) throw new SdkError(SdkErrorCode.AlreadyConnected, "Use a separate Server instance per connection: this instance is already connected to a transport. To connect it to a new transport, call close() first.");
32837
+ await super.connect(transport);
32838
+ }
32816
32839
  /**
32817
32840
  * Registers the built-in `logging/setLevel` request handler.
32818
32841
  *
@@ -33366,21 +33389,41 @@ var Server = class extends Protocol {
33366
33389
  function discoverAdvertisedCapabilities(capabilities) {
33367
33390
  return { ...capabilities };
33368
33391
  }
33392
+ function toolInputElementCount(value, max) {
33393
+ let count = 0;
33394
+ const stack = [value];
33395
+ while (stack.length > 0) {
33396
+ const node2 = stack.pop();
33397
+ if (node2 === null || typeof node2 !== "object") continue;
33398
+ if (Array.isArray(node2)) for (const child of node2) {
33399
+ if (++count > max) return count;
33400
+ if (child !== null && typeof child === "object") stack.push(child);
33401
+ }
33402
+ else for (const key in node2) {
33403
+ if (!Object.prototype.hasOwnProperty.call(node2, key)) continue;
33404
+ if (++count > max) return count;
33405
+ const child = node2[key];
33406
+ if (child !== null && typeof child === "object") stack.push(child);
33407
+ }
33408
+ }
33409
+ return count;
33410
+ }
33411
+ function resolveMaxToolInputElements(value) {
33412
+ if (value === void 0 || value === Infinity) return void 0;
33413
+ if (typeof value !== "number" || Number.isNaN(value) || value < 1) throw new RangeError(`maxToolInputElements must be a number of at least 1, or Infinity, got ${String(value)}`);
33414
+ return value;
33415
+ }
33369
33416
  var McpServer = class {
33370
33417
  /**
33371
33418
  * The underlying {@linkcode Server} instance, useful for advanced operations like sending notifications.
33372
33419
  */
33373
33420
  server;
33421
+ _maxToolInputElements;
33374
33422
  _registeredResources = {};
33375
33423
  _registeredResourceTemplates = {};
33376
33424
  _registeredTools = {};
33377
33425
  _registeredPrompts = {};
33378
- /**
33379
- * Per-tool JSON-converted `inputSchema`, memoized so the SEP-2243
33380
- * registration-time scan and the pre-dispatch validation step share one
33381
- * conversion instead of paying it twice per request under the
33382
- * per-request-factory `createMcpHandler` model.
33383
- */
33426
+ /** Per-tool JSON-converted `inputSchema`, filled on first use by `toolInputSchemaJson()`. */
33384
33427
  _toolInputSchemaJson = {};
33385
33428
  /**
33386
33429
  * The JSON-serialized `inputSchema` of a registered tool, or `undefined`
@@ -33405,6 +33448,7 @@ var McpServer = class {
33405
33448
  }
33406
33449
  constructor(serverInfo, options) {
33407
33450
  this.server = new Server(serverInfo, options);
33451
+ this._maxToolInputElements = resolveMaxToolInputElements(options?.maxToolInputElements);
33408
33452
  if (options?.capabilities?.tools) this.setToolRequestHandlers();
33409
33453
  if (options?.capabilities?.resources) this.setResourceRequestHandlers();
33410
33454
  if (options?.capabilities?.prompts) this.setPromptRequestHandlers();
@@ -33477,7 +33521,7 @@ var McpServer = class {
33477
33521
  name,
33478
33522
  title: tool.title,
33479
33523
  description: tool.description,
33480
- inputSchema: tool.inputSchema ? standardSchemaToJsonSchema(tool.inputSchema, "input") : EMPTY_OBJECT_JSON_SCHEMA,
33524
+ inputSchema: tool.inputSchema ? convertListedInputSchema(name, tool.inputSchema) : EMPTY_OBJECT_JSON_SCHEMA,
33481
33525
  annotations: tool.annotations,
33482
33526
  icons: tool.icons,
33483
33527
  execution: tool.execution,
@@ -33522,6 +33566,7 @@ var McpServer = class {
33522
33566
  * Validates tool input arguments against the tool's input schema.
33523
33567
  */
33524
33568
  async validateToolInput(tool, args, toolName) {
33569
+ if (this._maxToolInputElements !== void 0 && toolInputElementCount(args, this._maxToolInputElements) > this._maxToolInputElements) throw new ProtocolError(ProtocolErrorCode.InvalidParams, `Invalid arguments for tool ${toolName}: arguments contain more than the maximum of ${this._maxToolInputElements} elements`);
33525
33570
  if (!tool.inputSchema) return;
33526
33571
  const parseResult = await validateStandardSchema(tool.inputSchema, args ?? {});
33527
33572
  if (!parseResult.success) throw new ProtocolError(ProtocolErrorCode.InvalidParams, `Input validation error: Invalid arguments for tool ${toolName}: ${parseResult.error}`);
@@ -33796,20 +33841,19 @@ var McpServer = class {
33796
33841
  }
33797
33842
  _createRegisteredTool(name, title, description, inputSchema, outputSchema, annotations, icons, execution, scopeChallenge, _meta, handler) {
33798
33843
  validateAndWarnToolName(name);
33799
- if (inputSchema !== void 0) try {
33800
- const json2 = standardSchemaToJsonSchema(inputSchema, "input");
33801
- this._toolInputSchemaJson[name] = json2;
33802
- const scan = scanXMcpHeaderDeclarations(json2);
33803
- if (!scan.valid) console.warn(`[mcp-sdk] tool '${name}' carries an invalid x-mcp-header declaration and will be excluded by conforming Streamable HTTP clients: ${scan.reason}`);
33804
- } catch {
33805
- }
33806
33844
  let currentHandler = handler;
33845
+ let outputSchemaJson;
33807
33846
  const registeredTool = {
33808
33847
  title,
33809
33848
  description,
33810
33849
  inputSchema,
33811
33850
  outputSchema,
33812
- outputSchemaJson: convertOutputSchemaJson(outputSchema),
33851
+ get outputSchemaJson() {
33852
+ return outputSchemaJson ??= convertOutputSchemaJson(registeredTool.outputSchema);
33853
+ },
33854
+ set outputSchemaJson(value) {
33855
+ outputSchemaJson = value;
33856
+ },
33813
33857
  annotations,
33814
33858
  icons,
33815
33859
  execution,
@@ -33936,6 +33980,12 @@ var EMPTY_OBJECT_JSON_SCHEMA = {
33936
33980
  type: "object",
33937
33981
  properties: {}
33938
33982
  };
33983
+ function convertListedInputSchema(name, inputSchema) {
33984
+ const json2 = standardSchemaToJsonSchema(inputSchema, "input");
33985
+ const scan = scanXMcpHeaderDeclarations(json2);
33986
+ if (!scan.valid) console.warn(`[mcp-sdk] tool '${name}' carries an invalid x-mcp-header declaration and will be excluded by conforming Streamable HTTP clients: ${scan.reason}`);
33987
+ return json2;
33988
+ }
33939
33989
  function convertOutputSchemaJson(outputSchema) {
33940
33990
  if (outputSchema === void 0) return void 0;
33941
33991
  try {
@@ -33948,7 +33998,7 @@ function createPromptHandler(name, argsSchema, callback) {
33948
33998
  if (argsSchema) {
33949
33999
  const typedCallback = callback;
33950
34000
  return async (args, ctx) => {
33951
- const parseResult = await validateStandardSchema(argsSchema, args);
34001
+ const parseResult = await validateStandardSchema(argsSchema, args ?? {});
33952
34002
  if (!parseResult.success) throw new ProtocolError(ProtocolErrorCode.InvalidParams, `Invalid arguments for prompt ${name}: ${parseResult.error}`);
33953
34003
  return typedCallback(parseResult.data, ctx);
33954
34004
  };
@@ -35262,7 +35312,10 @@ function surfaceToolHints(server) {
35262
35312
  ));
35263
35313
  }
35264
35314
  async function createMcpServer(opts) {
35265
- const server = new McpServer({ name: opts.name, version: opts.version }, { supportedProtocolVersions: [...SERVER_PROTOCOL_VERSIONS] });
35315
+ const server = new McpServer({ name: opts.name, version: opts.version }, {
35316
+ supportedProtocolVersions: [...SERVER_PROTOCOL_VERSIONS],
35317
+ ...opts.maxToolInputElements !== void 0 ? { maxToolInputElements: opts.maxToolInputElements } : {}
35318
+ });
35266
35319
  if (opts.surfaceHints !== false)
35267
35320
  surfaceToolHints(server);
35268
35321
  if (opts.banner !== void 0) {
@@ -36682,7 +36735,7 @@ function registerSheetsTools(server) {
36682
36735
  }
36683
36736
 
36684
36737
  // ../gogcli-mcp/src/server.ts
36685
- var VERSION = true ? "4.6.1" : "0.0.0";
36738
+ var VERSION = true ? "4.6.2" : "0.0.0";
36686
36739
 
36687
36740
  // ../gogcli-mcp/src/bootstrap-auth.ts
36688
36741
  import { join as join7 } from "node:path";
@@ -37971,7 +38024,7 @@ await runMcp({
37971
38024
  });
37972
38025
  /*! Bundled license information:
37973
38026
 
37974
- @modelcontextprotocol/server/dist/src-D-y6h4N7.mjs:
38027
+ @modelcontextprotocol/server/dist/src-Cqbh3MYc.mjs:
37975
38028
  (*!
37976
38029
  * content-type
37977
38030
  * Copyright(c) 2015 Douglas Christopher Wilson
package/manifest.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "manifest_version": "0.3",
4
4
  "name": "gogcli-mcp-sheets",
5
5
  "display_name": "gogcli (Sheets)",
6
- "version": "4.6.1",
6
+ "version": "4.6.2",
7
7
  "description": "Extended Google Sheets for Claude via gogcli — auth + full Sheets support",
8
8
  "author": {
9
9
  "name": "Chris Hall",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gogcli-mcp-sheets",
3
- "version": "4.6.1",
3
+ "version": "4.6.2",
4
4
  "mcpName": "io.github.chrischall/gogcli-mcp-sheets",
5
5
  "description": "Extended Google Sheets MCP server via gogcli — all base tools plus full Sheets support",
6
6
  "author": "Claude Code (AI) <https://www.anthropic.com/claude>",
@@ -24,8 +24,8 @@
24
24
  "test:coverage": "vitest run --coverage"
25
25
  },
26
26
  "dependencies": {
27
- "@chrischall/mcp-utils": "^2.13.0",
28
- "@modelcontextprotocol/server": "^2.1.0",
27
+ "@chrischall/mcp-utils": "^2.14.0",
28
+ "@modelcontextprotocol/server": "^2.3.0",
29
29
  "zod": "^4.6.1"
30
30
  },
31
31
  "license": "MIT",
package/server.json CHANGED
@@ -7,12 +7,12 @@
7
7
  "source": "github",
8
8
  "subfolder": "packages/gogcli-mcp-sheets"
9
9
  },
10
- "version": "4.6.1",
10
+ "version": "4.6.2",
11
11
  "packages": [
12
12
  {
13
13
  "registryType": "npm",
14
14
  "identifier": "gogcli-mcp-sheets",
15
- "version": "4.6.1",
15
+ "version": "4.6.2",
16
16
  "transport": {
17
17
  "type": "stdio"
18
18
  },