Skip to main content

Module browser

Module browser 

Source
Expand description

What a browser tool call hands back from the server’s browser.

A call answers the parts the tool returned, in order: text, or an image whose bytes the MCP host hands to the CLI as their own content block. The browser is the server’s, so none of this crosses the socket; and the image’s bytes are not in this type’s JSON form either, because a screenshot is megabytes and base64 in JSON would pay a third again for it.

Re-exports§

use serde::Deserialize; 🔒
use serde::Deserialize; 🔒
use serde::Serialize; 🔒
use serde::Serialize; 🔒

Structs§

BrowserAudio
One packet of the page’s audio, as the controlling client plays it.
BrowserDownload
One finished download, on its way to the person’s save door.
BrowserFileAsk
A page’s file chooser, as the client’s picker reads it.
BrowserFrame
One encoded browser frame as the socket relays it.
BrowserNavState
Where the page’s history sits: what the takeover bar’s two arrows may do.
BrowserTabDialog
A page dialog holding a tab, as the strip names it.
BrowserTabList
One profile’s tabs and how the profile itself is doing.
BrowserTabRow
One tab as a client’s browser strip draws it.
BrowserUpload
One file a person chose, on its way to the server’s host as a path.
BrowserViewState
One tab’s viewer state, as every attached client sees it.
HandOff
A browser hand-off: a session asking the person at a client to act in a browser tab before it can carry on.
HandOffAnswer
One answer to a parked browser hand-off: what it means, which door sent it, and the connection that carried it.
InputModifiers
The modifier keys a person held for one input event.
ProfileKey
One org’s browser profile, <org>/<name>: two path-safe segments, and the unit every profile lookup is keyed by.

Enums§

BrowserInputEvent
One input event a controlling viewer sends, in CSS pixels for the page’s viewport.
BrowserPart
One part of a browser tool’s answer.
BrowserTabState
What a tab is doing, as the strip’s mark says it.
HandOffEnding
Why a hand-off left the registry.
HandOffSource
Which door in a client produced a hand-off’s answer.
MouseAction
One pointer gesture’s kind.

Constants§

ADVERTISED_TOOLS
Every browser tool the spec table advertises, by name.
DOWNLOAD_BACKLOG
How many finished downloads one profile’s broadcast keeps for a viewer that is not reading.
MAX_UPLOAD_BYTES
The most one file answer may carry across all its files, and the most files it may name.
MAX_UPLOAD_FILES

Functions§

segment_refusal 🔒
One segment of a profile key: what can be a directory name and nothing else. A name is the profile charset; an org may carry any character a directory holds, but never a separator or a dot traversal.