Get the user a link to sign Bowmark in to a site
add_connectionGet a sign-in link for one site, so the user can sign Bowmark in to it right now, before any run needs it. Pass the site as a domain (youtube.com), a URL, or a provider id. Call this whenever the user asks to log in, sign in, connect or link an account on a site — never send them to the Bowmark Buddy extension or the dashboard to do it themselves.
It returns url, a single-use link that expires (expiresAt). Give the user that URL and say which site it is for. On that page they sign in with Bowmark's own browser, or, in desktop Chrome with Bowmark Buddy installed, press "Use Chrome extension" to send the login that Chrome already holds. Then call wait_for_sign_in with the returned ref: it answers the moment they finish, and every later run uses the new login.
For a valid site outside Bowmark's automatic sign-in catalog, this still returns url and savedLogin: give the user the link, then have them use Bowmark Buddy (bowmark.ai/link) to explicitly save the login already in their Chrome. A visit never saves an arbitrary site's login. Wait on ref, then read signed-in pages with read.page(url, { connection }). Do not offer a workaround that asks for their password. An invalid site name returns sites, the sites Bowmark can sign in to automatically. A public page still works without a login: get_library shows what can read it.
To sign back in to a saved login that stopped working, pass its id from list_connections as connection. The fresh session goes into the SAME id.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"site": "<site>"
},
"name": "add_connection"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| site | Yes | The site to sign in to: a domain (`youtube.com`), a URL, its name, or a provider id. | |
| connection | No | Optional. The `id` of a saved login from `list_connections`, to sign back in to it. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | Pass it to `wait_for_sign_in` to hear the sign-in finish. | |
| url | No | The single-use sign-in link to give the user. | |
| site | No | The site the link signs in to. | |
| sites | No | Every site Bowmark can sign in to. | |
| title | No | Its name. | |
| ambiguous | No | The sites a name could mean — ask the user which. | |
| expiresAt | No | When the link expires. | |
| connection | No | The saved login this link refreshes, if one was named. | |
| savedLogin | No | When signInSupported is false: this handoff lets the user explicitly save their existing Chrome login through Bowmark Buddy; a script then reads signed-in pages with `read.page(url, { connection })`. | |
| anotherLogin | No | True when this adds a second login on that site. | |
| signInSupported | No | False when Bowmark cannot sign in automatically; a saved-login handoff may still be present. |