FoxMCP
v1.7.0Let your AI assistant use your real, logged-in Firefox: tabs, pages, bookmarks, history.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
profiles_list
Discover connected Firefox profiles, their real names and windows. Use this first to choose a profile_id for browser commands, and again after a disconnect or server restart: IDs change on every reconnect. Window, tab, group, container and monitor IDs belong to that profile only. With populate=True, inspect tab titles/URLs to choose a target; False omits tabs. Use list_windows for windows in one known profile. Read-only; does not switch profiles or focus windows. Names may repeat or be unavailable; per-profile window errors are reported separately.
| Parameter | Type | Description |
|---|---|---|
populate | boolean | Include each window's tabs with titles and URLs. |
list_windows
List all browser windows profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never reuse them in another profile.
| Parameter | Type | Description |
|---|---|---|
profile_id * | integer | |
populate | boolean | Whether to include tab information for each window |
get_window
Get information about a specific window profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never reuse them in another profile.
| Parameter | Type | Description |
|---|---|---|
profile_id * | integer | |
window_id * | integer | The ID of the window to retrieve |
populate | boolean | Whether to include tab information |
get_current_window
Read this profile's current (most recently focused) Firefox window. Does not focus or change the window. Use get_window for a known window_id, or list_windows to inspect all windows in this profile. populate controls whether the result includes the window's tabs. profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never reuse them in another profile.
| Parameter | Type | Description |
|---|---|---|
profile_id * | integer | |
populate | boolean | Whether to include tab information |
create_window
Create a new browser window profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never reuse them in another profile.
| Parameter | Type | Description |
|---|---|---|
profile_id * | integer | |
focused | boolean | Whether the new window takes focus. Firefox always focuses a new window, so with False the extension hands focus back to the window that had it; the result says "(focused)" if the new window kept it a… |
height | Window height in pixels | |
incognito | boolean | Whether to create an incognito window |
left | Window left position in pixels | |
state | string | Window state ("normal", "minimized", "maximized", "fullscreen") |
top | Window top position in pixels | |
url | URL to load in the new window | |
width | Window width in pixels | |
window_type | string | Type of window ("normal", "popup", "panel", "detached_panel") |
close_window
Close a browser window profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never reuse them in another profile.
| Parameter | Type | Description |
|---|---|---|
profile_id * | integer | |
window_id * | integer | The ID of the window to close |
focus_window
Bring a window to front and focus it profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never reuse them in another profile.
| Parameter | Type | Description |
|---|---|---|
profile_id * | integer | |
window_id * | integer | The ID of the window to focus |
update_window
Update window properties profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never reuse them in another profile.
| Parameter | Type | Description |
|---|---|---|
profile_id * | integer | |
window_id * | integer | The ID of the window to update |
focused | True brings the window to the front. False is refused: Firefox cannot take focus away from a window, so call focus_window on the window that should have it instead. | |
height | New window height in pixels | |
left | New window left position in pixels | |
state | New window state ("normal", "minimized", "maximized", "fullscreen") | |
top | New window top position in pixels | |
width | New window width in pixels |
tabs_list
List open browser tabs, optionally filtered by window and cookie store Each line includes "[window {id}, index {n}] [cookie store {cookie_store_id}]", and carries "(active)" for the active tab of its window and "(pinned)" for a pinned one. The window, the index and the pinned mark are what tabs_move needs: the window to move a tab out of or into, the position it currently holds, and whether a leading run of pinned tabs blocks the low indexes. profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never reuse them in another profile.
| Parameter | Type | Description |
|---|---|---|
profile_id * | integer | |
cookie_store_id | Opaque store ID to filter by, combined with window_id. | |
window_id | Restrict the listing to this window (optional, accepts int or string). Omit it to list tabs in every window. |
tabs_create
Create a new browser tab profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never reuse them in another profile.
| Parameter | Type | Description |
|---|---|---|
profile_id * | integer | |
url * | string | URL to open in the new tab |
active | boolean | Whether the tab should be active (default: True) |
cookie_store_id | Opaque store ID from containers_list, or firefox-default. Omit for existing behavior. Explicit selection never falls back. | |
pinned | boolean | Whether the tab should be pinned (default: False) |
window_id | Window ID to create tab in (optional, accepts int or string) |
tabs_close
Close one browser tab, removing its live page and possibly unsaved state. Use tabs_list to identify the tab first. Use tabs_switch to select a tab without closing it, or close_window to close an entire window. Closing the last tab may close its window. There is no FoxMCP tool to restore a closed tab; an invalid or already closed tab ID fails. profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never reuse them in another profile.
| Parameter | Type | Description |
|---|---|---|
profile_id * | integer | |
tab_id * | integer | ID of the tab to close |
tabs_switch
Switch to a specific browser tab profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never reuse them in another profile.
| Parameter | Type | Description |
|---|---|---|
profile_id * | integer | |
tab_id * | integer | ID of the tab to switch to |
tabs_group
Group existing tabs, optionally setting the group's title and colour Never activates a tab or focuses a window. Requires Firefox 139+. Omit group_id to create a group in the first tab's window, which moves tabs from other windows into it; pass a group_id from tabs_groups_query to add tabs to that group instead. Firefox unpins a pinned tab before grouping it, and refuses to mix private and non-private tabs. Grouping and styling are separate steps in Firefox. If the tabs were grouped but the title or colour could not be set, the result still names the group, and tabs_groups_update can retry th…
| Parameter | Type | Description |
|---|---|---|
profile_id * | integer | |
tab_ids * | Tab ID, or several as a list (`[12, 15]`) or a JSON string (`"[12, 15]"`). | |
color | blue, cyan, grey, green, orange, pink, purple, red or yellow. Omit to leave as is. | |
group_id | Group to add the tabs to; omit it to create a new group. | |
title | Group title; an empty string clears it. Omit to leave as is. |
tabs_ungroup
Remove tabs from their tab group Never activates a tab or focuses a window. Requires Firefox 138+. Firefox deletes a group once its last tab leaves it. profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never reuse them in another profile.
| Parameter | Type | Description |
|---|---|---|
profile_id * | integer | |
tab_ids * | Tab ID, or several as a list (`[12, 15]`) or a JSON string (`"[12, 15]"`). |
tabs_groups_update
Change a tab group's title, colour or collapsed state Leaves the group's tabs where they are. Requires Firefox 139+. Give at least one of title, color or collapsed. profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never reuse them in another profile.
| Parameter | Type | Description |
|---|---|---|
group_id * | The group to change, from tabs_group or tabs_groups_query. | |
profile_id * | integer | |
collapsed | Whether the group should be collapsed. | |
color | blue, cyan, grey, green, orange, pink, purple, red or yellow. | |
title | New title; an empty string clears it. |
tabs_groups_query
List tab groups with their IDs, in every window or filtered Requires Firefox 139+. tabs_group reports a group's ID only when it creates the group, so this is how to find the ID of any other group. profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never reuse them in another profile.
| Parameter | Type | Description |
|---|---|---|
profile_id * | integer | |
collapsed | Only collapsed (True) or expanded (False) groups. | |
color | Only groups of this colour. | |
title | Only groups with exactly this title. | |
window_id | Only groups in this window (optional, accepts int or string). |
tabs_move
Move tabs to a new position, optionally into another window Reorders tabs within their window, or gathers them into a different window — to collect every tab for one site into a window of its own, create the window with create_window and pass its ID here. Succeeding partially is normal, so check the result: it reads "Moved {n} of {m}", and a tab missing from the list did not move. Firefox declines some moves without raising an error, and the common one is that **an unpinned tab cannot be placed in front of a pinned tab** — with 3 pinned tabs, the lowest index an unpinned tab can reach is…
| Parameter | Type | Description |
|---|---|---|
profile_id * | integer | |
tab_ids * | Tab ID, or several as a list (`[12, 15]`) or a JSON string (`"[12, 15]"`). Listed tabs keep their given order at the destination. | |
index | integer | Position to move to, counting from 0; -1 means the end (default: -1). An index inside a leading run of pinned tabs is refused for an unpinned tab — the move reports "No tabs moved" rather than faili… |
window_id | Window to move the tabs into (optional, accepts int or string). Omit it to reorder within each tab's current window. |
tabs_capture_screenshot
Capture a screenshot of the visible tab, or of the tab given by tab_id What comes back depends on whether you pass a filename: with one, the image is written to disk and you get a success message and the path; without one, you get the image inline as a base64 data URL, which for a full window is large. profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never reuse them in another profile.
| Parameter | Type | Description |
|---|---|---|
profile_id * | integer | |
filename | Name of the file to save the screenshot (optional, if not provided returns base64) | |
format | string | Image format ('png' or 'jpeg', default: 'png') |
quality | integer | Image quality for JPEG format (1-100, default: 90) |
tab_id | Capture this tab, even in the background (not with window_id) | |
window_id | ID of the window to capture (optional, defaults to current window) |
containers_list
List Firefox containers as JSON with opaque cookie_store_id, name, color and icon; default_cookie_store_id identifies normal browsing separately. IDs belong to the connected profile. Names may repeat. profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never reuse them in another profile.
| Parameter | Type | Description |
|---|---|---|
profile_id * | integer |
containers_create
Create a persistent Firefox container. Return JSON container metadata. Duplicate names are permitted. Firefox validates color and icon. profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never reuse them in another profile.
| Parameter | Type | Description |
|---|---|---|
name * | string | |
profile_id * | integer | |
color | string | |
icon | string |
containers_update
Update a named Firefox container, preserving its ID and omitted properties. Supply at least one of name, color or icon. Return JSON container metadata. profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never reuse them in another profile.
| Parameter | Type | Description |
|---|---|---|
cookie_store_id * | string | |
profile_id * | integer | |
color | ||
icon | ||
name |
containers_remove
Remove a named Firefox container and its stored site data. Refuses open tabs with CONTAINER_IN_USE and tab_ids. Close tabs explicitly first. The check cannot exclude races with browser UI. No automatic cleanup. profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never reuse them in another profile.
| Parameter | Type | Description |
|---|---|---|
cookie_store_id * | string | |
profile_id * | integer |
history_query
Search browser history profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never reuse them in another profile.
| Parameter | Type | Description |
|---|---|---|
profile_id * | integer | |
query * | string | Substring to match in URL or title (exact substring match, not tokenized keywords) |
end_time | End time filter (ISO format, optional) | |
max_results | integer | Maximum number of results (default: 200) |
start_time | Start time filter (ISO format, optional) |
history_get_recent
Get recent browser history profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never reuse them in another profile.
| Parameter | Type | Description |
|---|---|---|
profile_id * | integer | |
count | integer | Number of recent items to get (default: 10) |
history_delete_item
Delete all history visits for one exact URL in this profile. Use history_query to find the URL first. This removes history records, not the open tab, bookmarks or cookies, and FoxMCP has no history restore tool. Use tabs_close if the goal is to close a page instead. profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never reuse them in another profile.
| Parameter | Type | Description |
|---|---|---|
profile_id * | integer | |
url * | string | URL of the history item to delete |
bookmarks_list
List browser bookmarks Folders are marked 📁 and bookmarks 🔖. Every line carries its own ID, its parent folder's ID and its index, its position within that folder counting from 0. The IDs are what bookmarks_update, bookmarks_delete, bookmarks_move and the parent_id of bookmarks_create take, so this listing is how you find them. With folder_id, the lines are that folder's direct children in order. Without it, the whole tree is listed and a folder's children are interleaved with everything nested under them, so read positions from Index, not line order. An empty folder returns "No bookmark…
| Parameter | Type | Description |
|---|---|---|
profile_id * | integer | |
folder_id | Optional folder ID to list bookmarks from |
bookmarks_search
Search browser bookmarks by title or URL Matches bookmarks only — **folders are never returned**, so a folder cannot be found this way; use bookmarks_list to walk the tree instead. Each result carries its own ID and its parent folder's ID, which is what bookmarks_update and bookmarks_delete take. No matches returns "No bookmarks found". profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never reuse them in another profile.
| Parameter | Type | Description |
|---|---|---|
profile_id * | integer | |
query * | string | Search query for bookmarks |
bookmarks_create
Create a new bookmark profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never reuse them in another profile.
| Parameter | Type | Description |
|---|---|---|
profile_id * | integer | |
title * | string | Title of the bookmark |
url * | string | URL of the bookmark |
parent_id | Optional ID of the folder to create it in. It must be a folder; a bookmark or separator ID is refused. |
bookmarks_create_folder
Create a new bookmark folder profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never reuse them in another profile.
| Parameter | Type | Description |
|---|---|---|
profile_id * | integer | |
title * | string | Title of the folder |
parent_id | Optional ID of the folder to create it in. It must be a folder; a bookmark or separator ID is refused. |
bookmarks_update
Update a bookmark or folder's title and/or URL profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never reuse them in another profile.
| Parameter | Type | Description |
|---|---|---|
bookmark_id * | string | ID of the bookmark or folder to update |
profile_id * | integer | |
title | New title (optional) | |
url | New URL (optional, only for bookmarks not folders) |
bookmarks_move
Move a bookmark or folder into another folder, or to another position The bookmark keeps its ID, unlike deleting and recreating it. A folder moves with everything in it. Give at least one of parent_id and index. Use bookmarks_list to find IDs and the current index of each entry. Firefox refuses to move the hidden bookmark root, or a folder into itself or one of its own subfolders. profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never reuse them in another profile.
| Parameter | Type | Description |
|---|---|---|
bookmark_id * | string | ID of the bookmark or folder to move. |
profile_id * | integer | |
index | Position in the destination folder, counting from 0. It is the final position: in the same folder, moving index 0 to index 2 leaves it third. An index past the end means the last place. Omit it to put… | |
parent_id | Folder to move it into. It must be a folder; a bookmark or separator ID is refused. Omit it to reorder within the current folder. |
bookmarks_delete
Delete a bookmark profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never reuse them in another profile.
| Parameter | Type | Description |
|---|---|---|
bookmark_id * | string | ID of the bookmark to delete |
profile_id * | integer |
content_load_file
Load a server-local file for website uploads/imports; does not submit it. Waits for downloading to finish, then returns JSON with file_id and metadata. In the SAME tab, use content_execute_script or a predefined script: const file = globalThis.foxmcpFiles.get(file_id); For file inputs, use cloneInto(file, window), the page's window.wrappedJSObject.DataTransfer, and input/change events. Return metadata, not the File. Release: globalThis.foxmcpFiles.delete(file_id). Handle expires five minutes after loading or on navigation; assigned inputs remain valid. Download timeout: 110s. Private tabs uns…
| Parameter | Type | Description |
|---|---|---|
path * | string | Regular file on the server's machine; only its basename reaches the tab. |
profile_id * | integer | |
tab_id * | integer | Target tab ID. |
mime_type | Optional MIME override; otherwise inferred from the filename, falling back to application/octet-stream. |
content_get_text
Read the current page body's rendered text (document.body.innerText). Use this for readable page content, or content_get_html for markup. Reads the main document without changing it; does not include iframe documents or wait for future lazy-loaded content. Restricted Firefox pages that block content scripts cannot be read. max_length slices the extracted text by character count and adds an ellipsis when truncated; omission returns all extracted text. profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never reuse them in another profile.
| Parameter | Type | Description |
|---|---|---|
profile_id * | integer | |
tab_id * | integer | ID of the tab to get content from |
max_length | Optional maximum length of text to return (default: unlimited) |
content_get_html
Read the main document's current HTML, limited to 2,000 characters. Use this for markup, or content_get_text for rendered text. Reads document.documentElement.outerHTML without changing the page; adds an ellipsis if truncated. Does not include iframe documents. profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never reuse them in another profile.
| Parameter | Type | Description |
|---|---|---|
profile_id * | integer | |
tab_id * | integer | ID of the tab to get HTML content from |
content_execute_script
Execute JavaScript code in a tab An optional extension setting requires user approval per tab/origin. Each approval prompt expires after 60 seconds; queued tabs wait in turn. profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never reuse them in another profile.
| Parameter | Type | Description |
|---|---|---|
code * | string | JavaScript code to execute |
profile_id * | integer | |
tab_id * | integer | ID of the tab to execute script in |
content_execute_predefined
Execute a predefined external script and run its JavaScript output in a tab Generated JavaScript obeys the extension's per-tab/origin script consent. Each approval prompt expires after 60 seconds; queued tabs wait in turn. profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never reuse them in another profile. Available scripts: - dom-summarize.sh [onscreen [withpos]]: List the page's visible interactive elements as an indented tree, tagging each with a persistent dsid attribute to select it by later - gcal-cal-event-js.sh "Event Title" day time:…
| Parameter | Type | Description |
|---|---|---|
profile_id * | integer | |
script_name * | string | Name of the script to run, one of those listed above |
tab_id * | integer | ID of the tab to execute script in |
script_args | string | JSON array of strings to pass to the external script (e.g., '["arg1", "arg2"]') or empty string for no arguments |
requests_start_monitoring
Start capturing future web requests matching URL patterns in a profile. Start before triggering navigation or other traffic. Each call starts a monitor; use requests_list_captured to read an existing one instead. Keep the returned monitor_id for requests_list_captured, requests_get_content and requests_stop_monitoring; monitors cannot be listed. Omit tab_id to capture matching traffic across this profile. Capturing uses memory. Stop when finished; summaries remain readable until the profile disconnects, but only the latest 200 response bodies across all monitors are kept. Client disconnectio…
| Parameter | Type | Description |
|---|---|---|
profile_id * | integer | |
url_patterns * | array | List of URL patterns to monitor (e.g., ["https://api.example.com/*", "*/api/*"]) |
options | Optional configuration for monitoring: - capture_response_bodies: bool (default: True) - max_body_size: int (default: 50000) — bytes kept per body; the full size is reported either way - content_t… | |
tab_id | Optional tab ID to monitor (if not provided, monitors all tabs) |
requests_stop_monitoring
Stop one monitor immediately and return its capture totals. Use the monitor_id returned by requests_start_monitoring when no more traffic needs capturing. drain_timeout is ignored: this does not wait for in-flight requests. Already captured records remain available to requests_list_captured and requests_get_content until the profile disconnects, subject to the response-body limit. An unknown monitor_id returns a "not found" error. profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never reuse them in another profile.
| Parameter | Type | Description |
|---|---|---|
monitor_id * | string | ID of the monitoring session to stop |
profile_id * | integer | |
drain_timeout | integer | Accepted and ignored; the monitor stops at once |
requests_list_captured
List all captured request summaries from a monitoring session A request appears here once it has completed, so a page navigation started a moment ago will not be in the list yet. Start with requests_start_monitoring, then reuse its monitor_id here. This reads stored summaries without starting or stopping capture. Use a returned request_id with requests_get_content to inspect its stored body. profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never reuse them in another profile.
| Parameter | Type | Description |
|---|---|---|
monitor_id * | string | ID of the monitoring session |
profile_id * | integer |
requests_get_content
Read a captured request's stored metadata and text body. Use monitor_id from requests_start_monitoring and request_id from requests_list_captured. This reads captured data, without making a new network request. Bodies can be truncated by the monitor's max_body_size option. The response carries **response_body.included** and **note**: a body that was not text, or not one of the monitored content types, comes back with `content: null` and its size filled in. `request_headers` is always empty. profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never…
| Parameter | Type | Description |
|---|---|---|
monitor_id * | string | ID of the monitoring session |
profile_id * | integer | |
request_id * | string | ID of the specific request |
include_binary | boolean | Accepted and ignored; binary bodies never come back |
save_request_body_to | Accepted and ignored; nothing is written to disk | |
save_response_body_to | Accepted and ignored; nothing is written to disk |
debug_websocket_status
Read the server's connected Firefox profile IDs and names. Use this for a quick connection check, including when no extension is connected. It reads server connection state without changing browser state or reconnecting anything. Use profiles_list for windows/tabs and target discovery before browser commands.