Skip to content

Commit 46d0865

Browse files
hide behind a flag
1 parent 8663542 commit 46d0865

3 files changed

Lines changed: 12 additions & 0 deletions

File tree

src/bin/chrome-devtools-mcp-cli-options.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,11 @@ export const cliOptions = {
164164
'Whether to enable coordinate-based tools such as click_at(x,y). Usually requires a computer-use model able to produce accurate coordinates by looking at screenshots.',
165165
hidden: false,
166166
},
167+
experimentalMemory: {
168+
type: 'boolean',
169+
describe: 'Whether to enable experimental memory tools.',
170+
hidden: true,
171+
},
167172
experimentalStructuredContent: {
168173
type: 'boolean',
169174
describe: 'Whether to output structured formatted content.',

src/index.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,12 @@ export async function createMcpServer(
152152
) {
153153
return;
154154
}
155+
if (
156+
tool.annotations.conditions?.includes('experimentalMemory') &&
157+
!serverArgs.experimentalMemory
158+
) {
159+
return;
160+
}
155161
if (
156162
tool.annotations.conditions?.includes('experimentalInteropTools') &&
157163
!serverArgs.experimentalInteropTools

src/tools/memory.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ export const exploreMemorySnapshot = defineTool({
4242
annotations: {
4343
category: ToolCategory.MEMORY,
4444
readOnlyHint: true,
45+
conditions: ['experimentalMemory'],
4546
},
4647
schema: {
4748
filePath: zod.string().describe('A path to a .heapsnapshot file to read.'),

0 commit comments

Comments
 (0)