@@ -18,22 +18,23 @@ export class ToolDescriptionsUseCases implements ToolDescriptionsInputPort {
1818 " 1) getBasicBrowserContext → get browser state and tabKey" ,
1919 " 2) Analyze page content based on your goal and manifest version:" ,
2020 " - If interaction is required (clicking, filling forms, etc.):" ,
21- " · For Manifest Version 2: Use captureActiveTab for visual context or getReadableElements for element identification" ,
21+ " · For Manifest Version 2: Use captureTab for visual context or getReadableElements for element identification" ,
2222 " · For other Manifest Versions: Use only getReadableElements for element identification" ,
2323 " - If no interaction is required (just reading page content):" ,
2424 " · Use getReadableText to extract all visible text from the page" ,
2525 " 3) Interact using click/fill/enter tools with the obtained tabKey" ,
2626 ] . join ( "\n" ) ;
2727 } ;
2828
29- captureActiveTabInstruction = ( ) : string => {
29+ captureTabInstruction = ( ) : string => {
3030 return [
31- "📷 Captures a screenshot of the active browser tab" ,
32- "* Use this tool after calling getBasicBrowserContext to obtain visual context of the current page" ,
31+ "📷 Captures a screenshot of a browser tab" ,
32+ "* Use this tool after calling getBasicBrowserContext to obtain visual context of the page" ,
3333 "* The screenshot helps you see what the browser is displaying to the user" ,
34- "* No parameters are needed as it automatically captures the active tab " ,
34+ "* Requires tabKey from getBasicBrowserContext " ,
3535 "* Returns an image with width, height, and data in base64 format" ,
36- "* Workflow: 1) getBasicBrowserContext → 2) captureActiveTab → 3) interact with elements" ,
36+ "* Workflow: 1) getBasicBrowserContext → 2) captureTab → 3) interact with elements" ,
37+ "* Parameters: tabKey" ,
3738 "* NOTE: This feature is only available in browsers supporting Manifest Version 2" ,
3839 ] . join ( "\n" ) ;
3940 } ;
@@ -65,7 +66,7 @@ export class ToolDescriptionsUseCases implements ToolDescriptionsInputPort {
6566 "👆 Clicks on an element at specific X,Y coordinates" ,
6667 "* Use this to click on elements by their position on the screen" ,
6768 "* Requires tabKey from getBasicBrowserContext and x,y coordinates from the screenshot" ,
68- "* Coordinates are based on the captureActiveTab screenshot dimensions" ,
69+ "* Coordinates are based on the captureTab screenshot dimensions" ,
6970 "* Useful when you know the visual position of an element" ,
7071 "* Parameters: tabKey, x, y" ,
7172 ] . join ( "\n" ) ;
@@ -76,7 +77,7 @@ export class ToolDescriptionsUseCases implements ToolDescriptionsInputPort {
7677 "⌨️ Types text into an input field at specific X,Y coordinates" ,
7778 "* Use this to enter text into form fields by their position" ,
7879 "* Requires tabKey from getBasicBrowserContext, x,y coordinates, and the text to enter" ,
79- "* Coordinates are based on the captureActiveTab screenshot dimensions" ,
80+ "* Coordinates are based on the captureTab screenshot dimensions" ,
8081 "* First clicks at the specified position, then types the provided text" ,
8182 "* After filling text, check for associated submit-like buttons (submit, search, send, etc.)" ,
8283 "* If submit button is visible, use clickOnViewableElement with that button" ,
@@ -90,7 +91,7 @@ export class ToolDescriptionsUseCases implements ToolDescriptionsInputPort {
9091 "↵ Hits the Enter key on an element at specific X,Y coordinates" ,
9192 "* Use this to trigger actions like form submission or button clicks" ,
9293 "* Requires tabKey from getBasicBrowserContext and x,y coordinates from the screenshot" ,
93- "* Coordinates are based on the captureActiveTab screenshot dimensions" ,
94+ "* Coordinates are based on the captureTab screenshot dimensions" ,
9495 "* Parameters: tabKey, x, y" ,
9596 ] . join ( "\n" ) ;
9697 } ;
0 commit comments