mcp-google-ads 1.0.13 → 1.0.14

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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2025 drak-marketing
3
+ Copyright (c) 2026 drak-marketing
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -54,6 +54,8 @@ npm install
54
54
  npm run build
55
55
  ```
56
56
 
57
+ **Security:** Never share your `.mcp.json` file or commit it to git -- it may contain API credentials. Add `.mcp.json` to your `.gitignore`.
58
+
57
59
  ### 3. Configure
58
60
 
59
61
  ```bash
@@ -1 +1 @@
1
- {"sha":"00a842b","builtAt":"2026-04-09T22:23:35.553Z"}
1
+ {"sha":"1c7a8b2","builtAt":"2026-04-09T23:02:14.294Z"}
package/dist/index.js CHANGED
@@ -1759,11 +1759,13 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
1759
1759
  else {
1760
1760
  response.details = rawError.errors || rawError.stack;
1761
1761
  }
1762
+ // Size-limit error responses through safeResponse to prevent oversized payloads
1763
+ const safeErrorResponse = safeResponse(response, "error");
1762
1764
  return {
1763
1765
  isError: true,
1764
1766
  content: [{
1765
1767
  type: "text",
1766
- text: JSON.stringify(response, null, 2),
1768
+ text: JSON.stringify(safeErrorResponse, null, 2),
1767
1769
  }],
1768
1770
  };
1769
1771
  }
@@ -31,6 +31,10 @@ export function safeResponse(data, context) {
31
31
  const sizeBytes = Buffer.byteLength(jsonStr, "utf-8");
32
32
  if (sizeBytes <= MAX_RESPONSE_SIZE)
33
33
  return current;
34
+ // Deep clone on first truncation pass to avoid mutating the original object
35
+ if (pass === 0 && typeof current === "object" && current !== null) {
36
+ current = JSON.parse(JSON.stringify(current));
37
+ }
34
38
  logger.warn({ sizeBytes, maxSize: MAX_RESPONSE_SIZE, context, pass }, "Response exceeds size limit, truncating");
35
39
  if (Array.isArray(current)) {
36
40
  current = current.slice(0, Math.max(1, Math.floor(current.length * 0.5)));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mcp-google-ads",
3
3
  "mcpName": "io.github.mharnett/google-ads",
4
- "version": "1.0.13",
4
+ "version": "1.0.14",
5
5
  "description": "MCP server for Google Ads API with MCC support, 34 tools for campaign management, reporting, and optimization. Safe by default -- all changes created PAUSED.",
6
6
  "main": "dist/index.js",
7
7
  "bin": {