Skip to content

MCP Tools Reference

Complete reference for all MCP tools available in SideButton.

Workflow Tools

run_workflow

Execute a workflow automation.

Parameters:

NameTypeRequiredDescription
workflow_idstringYesWorkflow ID to execute
paramsobjectNoParameters for the workflow

Example:

json
{
  "workflow_id": "github_pr_review",
  "params": {
    "org": "mycompany",
    "repo": "myproject",
    "pr_number": "123"
  }
}

Response:

Workflow 'github_pr_review' completed successfully.

Run ID: github_pr_review_20251225_143022

Use get_run_log tool with this run_id to see detailed execution results.

list_workflows

List all available workflows.

Parameters:

NameTypeRequiredDescription
sourcestringNoFilter by source: all, actions, workflows

Example:

json
{
  "source": "actions"
}

Response: Markdown list of workflows with IDs, titles, and parameters.


get_workflow

Get the full YAML definition of a workflow.

Parameters:

NameTypeRequiredDescription
workflow_idstringYesWorkflow ID

Response: Complete YAML workflow definition.


get_run_log

Get detailed execution log for a completed run.

Parameters:

NameTypeRequiredDescription
run_idstringYesRun ID from run_workflow response

Response: Markdown formatted log including:

  • Status (completed/failed)
  • Duration
  • Parameters used
  • Step-by-step events
  • Extracted variables
  • Error messages

list_run_logs

List recent workflow executions.

Parameters:

NameTypeRequiredDescription
limitnumberNoMax results (default: 10)
workflow_idstringNoFilter by workflow ID

Response: List of recent runs with status and timestamps.


Browser Control Tools

get_browser_status

Check if the browser extension is connected.

Parameters: None

Response:

markdown
# Browser Status

- **Server Running:** true
- **Browser Connected:** true
- **Tab ID:** 123456
- **Recording:** false

Navigate the browser to a URL.

Parameters:

NameTypeRequiredDescription
urlstringYesURL to navigate to

Example:

json
{
  "url": "https://github.com"
}

Response: Navigated to: https://github.com


snapshot

Capture an accessibility snapshot of the current page as YAML.

Parameters:

NameTypeRequiredDescription
includeContentbooleanNoInclude visible text content

Response:

yaml
- Page URL: https://example.com
- Page Title: Example Domain
- Page Snapshot:
- main [ref=1]
  - heading "Example Domain" [ref=2]
  - paragraph [ref=3]
  - link "More information..." [ref=4]

Use ref numbers with click and type tools.


click

Click an element on the page.

Parameters:

NameTypeRequiredDescription
refnumberNo*Element ref from snapshot
selectorstringNo*CSS selector
elementstringNoDescription for logging

*One of ref or selector required.

Examples:

json
// By ref (from snapshot)
{
  "ref": 4,
  "element": "More information link"
}

// By selector
{
  "selector": "button.submit"
}

// With text selector
{
  "selector": "button:has-text('Submit')"
}

type

Type text into an input element.

Parameters:

NameTypeRequiredDescription
textstringYesText to type
refnumberNo*Element ref from snapshot
selectorstringNo*CSS selector
submitbooleanNoPress Enter after typing
elementstringNoDescription for logging

Example:

json
{
  "ref": 7,
  "text": "search query",
  "submit": true
}

scroll

Scroll the page in a direction.

Parameters:

NameTypeRequiredDescription
directionstringYesup, down, left, right
amountnumberNoPixels to scroll (default: 300)

Example:

json
{
  "direction": "down",
  "amount": 500
}

Scrolling in containers

Use hover first to position the cursor inside a scrollable container.


extract

Extract text content from an element.

Parameters:

NameTypeRequiredDescription
selectorstringYesCSS selector

Response: Text content of the matched element.


screenshot

Capture a screenshot of the current page.

Parameters: None

Response: Base64-encoded PNG image.


hover

Hover over an element (position cursor).

Parameters:

NameTypeRequiredDescription
selectorstringYesCSS selector

Use case: Position cursor before scrolling in nested containers.


capture_page

Capture all selectors and interactive elements from the current page.

Parameters: None

Response: Markdown formatted report including:

  • Page URL and title
  • data-testid selectors
  • aria-label selectors
  • Semantic class selectors
  • Interactive elements (buttons, links, inputs)
  • Form fields

Use case: Discover selectors when building workflows.


Error Responses

MCP tools return JSON-RPC errors when operations fail:

CodeMeaning
-32602Invalid parameters
-32603Internal error

Common errors:

ErrorCauseSolution
BrowserNotConnectedExtension not connectedConnect extension
Workflow not foundInvalid workflow_idCheck list_workflows
Element not foundSelector doesn't matchVerify selector
Missing required parameterParams not providedCheck workflow params

Usage Tips

Workflow vs Direct Control

ScenarioBest Approach
Repeated taskCreate workflow, use run_workflow
ExplorationUse direct browser tools
TestingDirect tools for inspection
ProductionWorkflows for reliability

Efficient Page Inspection

  1. Use snapshot to get page structure
  2. Use ref numbers for reliable element targeting
  3. Use capture_page to find selectors for workflows

Handling Dynamic Pages

  1. Use snapshot after navigation
  2. Wait for content to load
  3. Re-snapshot if page updates

Released under the Apache-2.0 License.