codebolt.browser
Browser automation and web interaction tools for controlling web browsers programmatically.
Available Tools
navigate
- Navigate to a specific URLclick
- Click on an element using a selectortype
- Type text into an input elementscreenshot
- Take screenshot of current pageget_content
- Get content of current pagescroll
- Scroll the page in a specific directionnew_page
- Create a new browser pageget_url
- Get the current page URLget_html
- Get the HTML content of the current pageget_markdown
- Get the page content in markdown formatextract_text
- Extract text content from the current pageget_snapshot
- Take a snapshot of the current page stateget_info
- Get browser informationsearch
- Search for text in an input elemententer
- Simulate pressing the Enter keyclose
- Close the current browser page
Sample Usage
// Navigate to a specific URL
const navigateResult = await codebolt.tools.executeTool(
"codebolt.browser",
"navigate",
{ url: "https://example.com" }
);
// Click on an element using a selector
const clickResult = await codebolt.tools.executeTool(
"codebolt.browser",
"click",
{ selector: "body" }
);
// Type text into an input element
const typeResult = await codebolt.tools.executeTool(
"codebolt.browser",
"type",
{ selector: "input", text: "test" }
);
// Take a screenshot
const screenshotResult = await codebolt.tools.executeTool(
"codebolt.browser",
"screenshot",
{ fullPage: true }
);
// Get page content
const contentResult = await codebolt.tools.executeTool(
"codebolt.browser",
"get_content",
{}
);
// Scroll the page
const scrollResult = await codebolt.tools.executeTool(
"codebolt.browser",
"scroll",
{ direction: "down", amount: 100 }
);
// Create a new page
const newPageResult = await codebolt.tools.executeTool(
"codebolt.browser",
"new_page",
{}
);
// Get current URL
const urlResult = await codebolt.tools.executeTool(
"codebolt.browser",
"get_url",
{}
);
// Get HTML content
const htmlResult = await codebolt.tools.executeTool(
"codebolt.browser",
"get_html",
{}
);
// Get markdown content
const markdownResult = await codebolt.tools.executeTool(
"codebolt.browser",
"get_markdown",
{}
);
// Extract text content
const textResult = await codebolt.tools.executeTool(
"codebolt.browser",
"extract_text",
{}
);
// Get page snapshot
const snapshotResult = await codebolt.tools.executeTool(
"codebolt.browser",
"get_snapshot",
{}
);
// Get browser info
const infoResult = await codebolt.tools.executeTool(
"codebolt.browser",
"get_info",
{}
);
// Search in an input element
const searchResult = await codebolt.tools.executeTool(
"codebolt.browser",
"search",
{ selector: "input", query: "test query" }
);
// Simulate Enter key
const enterResult = await codebolt.tools.executeTool(
"codebolt.browser",
"enter",
{}
);
// Close the browser
const closeResult = await codebolt.tools.executeTool(
"codebolt.browser",
"close",
{}
);
info
This functionality provides browser automation capabilities through the MCP interface.