@mcp-b/chrome-devtools-mcp 1.6.0 → 1.6.1

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.
@@ -201,17 +201,27 @@ export class WebMCPToolHub {
201
201
  return Array.from(this.#trackedTools.keys());
202
202
  }
203
203
  /**
204
- * Get all tracked tools with their metadata
204
+ * Get all tracked tools with their metadata.
205
+ * Only returns tools from pages in the current session's window scope.
205
206
  */
206
207
  getRegisteredTools() {
207
- return Array.from(this.#trackedTools.values()).map(rt => ({
208
- toolId: rt.toolId,
209
- originalName: rt.originalName,
210
- domain: rt.domain,
211
- pageIdx: this.#context.getPages().indexOf(rt.page),
212
- description: rt.description,
213
- inputSchema: rt.inputSchema,
214
- }));
208
+ const sessionPages = this.#context.getPages();
209
+ const result = [];
210
+ for (const rt of this.#trackedTools.values()) {
211
+ const pageIdx = sessionPages.indexOf(rt.page);
212
+ // Only include tools from pages in the session's window scope
213
+ if (pageIdx !== -1) {
214
+ result.push({
215
+ toolId: rt.toolId,
216
+ originalName: rt.originalName,
217
+ domain: rt.domain,
218
+ pageIdx,
219
+ description: rt.description,
220
+ inputSchema: rt.inputSchema,
221
+ });
222
+ }
223
+ }
224
+ return result;
215
225
  }
216
226
  /**
217
227
  * Get a tracked tool by name and page.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mcp-b/chrome-devtools-mcp",
3
- "version": "1.6.0",
3
+ "version": "1.6.1",
4
4
  "description": "MCP server for Chrome DevTools with WebMCP integration for connecting to website MCP tools",
5
5
  "keywords": [
6
6
  "mcp",