MCPcopy Create free account
hub / github.com/ChinaSiro/claude-code-sourcemap / j17

Function j17

package/cli.js:4554–4599  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4552${J.instructions}`);for(let J of _){if(!O.has(J.serverName))continue;let M=w.get(J.serverName);w.set(J.serverName,M?`${M}
4553
4554${J.block}`:`## ${J.serverName}
4555${J.block}`)}let j=[];for(let[J,M]of w)if(!z.has(J))j.push({name:J,block:M});let H=[];for(let J of z)if(!O.has(J))H.push(J);if(j.length===0&&H.length===0)return null;return d("tengu_mcp_instructions_pool_change",{addedCount:j.length,removedCount:H.length,priorAnnouncedCount:z.size,clientSideCount:_.length,messagesLength:K.length,attachmentCount:Y,midCount:$}),j.sort((J,M)=>J.name.localeCompare(M.name)),{addedNames:j.map((J)=>J.name),addedBlocks:j.map((J)=>J.block),removedNames:H.sort()}}var tp8=y(()=>{o1();k8();m8()});function j17(){return`# Claude in Chrome browser automation
4556
4557You have access to browser automation tools (mcp__claude-in-chrome__*) for interacting with web pages in Chrome. Follow these guidelines for effective browser automation.
4558
4559## GIF recording
4560
4561When performing multi-step browser interactions that the user may want to review or share, use mcp__claude-in-chrome__gif_creator to record them.
4562
4563You must ALWAYS:
4564* Capture extra frames before and after taking actions to ensure smooth playback
4565* Name the file meaningfully to help the user identify it later (e.g., "login_process.gif")
4566
4567## Console log debugging
4568
4569You can use mcp__claude-in-chrome__read_console_messages to read console output. Console output may be verbose. If you are looking for specific log entries, use the 'pattern' parameter with a regex-compatible pattern. This filters results efficiently and avoids overwhelming output. For example, use pattern: "[MyApp]" to filter for application-specific logs rather than reading all console output.
4570
4571## Alerts and dialogs
4572
4573IMPORTANT: Do not trigger JavaScript alerts, confirms, prompts, or browser modal dialogs through your actions. These browser dialogs block all further browser events and will prevent the extension from receiving any subsequent commands. Instead, when possible, use console.log for debugging and then use the mcp__claude-in-chrome__read_console_messages tool to read those log messages. If a page has dialog-triggering elements:
45741. Avoid clicking buttons or links that may trigger alerts (e.g., "Delete" buttons with confirmation dialogs)
45752. If you must interact with such elements, warn the user first that this may interrupt the session
45763. Use mcp__claude-in-chrome__javascript_tool to check for and dismiss any existing dialogs before proceeding
4577
4578If you accidentally trigger a dialog and lose responsiveness, inform the user they need to manually dismiss it in the browser.
4579
4580## Avoid rabbit holes and loops
4581
4582When using browser automation tools, stay focused on the specific task. If you encounter any of the following, stop and ask the user for guidance:
4583- Unexpected complexity or tangential browser exploration
4584- Browser tool calls failing or returning errors after 2-3 attempts
4585- No response from the browser extension
4586- Page elements not responding to clicks or input
4587- Pages not loading or timing out
4588- Unable to complete the browser task despite multiple approaches
4589
4590Explain what you attempted, what went wrong, and ask how the user would like to proceed. Do not keep retrying the same failing browser action or explore unrelated pages without checking in first.
4591
4592## Tab context and session startup
4593
4594IMPORTANT: At the start of each browser automation session, call mcp__claude-in-chrome__tabs_context_mcp first to get information about the user's current browser tabs. Use this context to understand what the user might want to work with before creating new tabs.
4595
4596Never reuse tab IDs from a previous/other session. Follow these guidelines:
45971. Only reuse an existing tab if the user explicitly asks to work with it
45982. Otherwise, create a new tab with mcp__claude-in-chrome__tabs_create_mcp
45993. If a tool returns an error indicating the tab doesn't exist or is invalid, call tabs_context_mcp to get fresh tab IDs
46004. When a tab is closed by the user or a navigation error occurs, call tabs_context_mcp to see what tabs are available`}var KfK=`# Claude in Chrome browser automation
4601
4602You have access to browser automation tools (mcp__claude-in-chrome__*) for interacting with web pages in Chrome. Follow these guidelines for effective browser automation.

Callers 1

i37Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected