Skip to content
GitHub (opens in a new tab)

ToolConnections

An agent's tools in one flat settings list, one row per tool: a logo slot, the name with a status dot, a muted detail line and an Off / Ask / Allow switch. A broken connection shows its error in danger text and Reconnect in place of the switch; a connection with several tools gets a quiet label above its rows.

stableOrganismcontracts/toolconnections.json

Preview

ToolConnections

The agent's tools in one flat list. Set each to Off, Ask or Allow, and fix the ones that break.

Master

Each row has the app's logo, its name with a small status dot, one muted line on what it does, and an Off / Ask / Allow switch with a hint on each option. Test all checks every connection and the footer counts the healthy ones. When a connection breaks, its line turns into the error and Reconnect takes the switch's place.

Tools and connections

  • GitHubConnectedRead code and open pull requests
  • SlackConnectedReply when mentioned in a thread
  • FigmaConnectedRead design files and comments
  • LinearConnectedCreate and update issues
  • NotionSearch the team wiki

Usage

Pass every connection with its status (connected, testing, error or disconnected) and each tool's permission (off, ask or allow). Pass logo with your own inline SVG; the kit bundles no brand logos, so without one the row falls back to icon, then initials. The component tests, reconnects and stores nothing. Test all calls onTest() with no id: set every connection to testing and pass testing while the run lasts, then each status. The footer shows Testing 4 connections, then 4 of 4 healthy (connections with every tool off are left out). onReconnect sets the connection to testing (Reconnect spins), then connected; onPermissionChange applies at once. Pass available and onConnect for a Connect a tool menu. A tool set to Off has no dot and dims. A connection with several tools gets a quiet label above its rows, with the error and Reconnect on it when it breaks. Only live changes move: the dot crossfades, the error fades in, the switch rises back in after a reconnect, the footer glides open, and a just-connected row opens and rises in. One polite live region says only test results, reconnects and permission changes.

Do's

  • settings for which tools an agent may use, per connected account or server
  • checking a connection's health, or fixing a broken one with Reconnect
  • deciding which tools run on their own and which ask first

Don'ts

  • finding or connecting a new provider — IntegrationPicker
  • an agent asking for standing access once — PermissionRequest
  • how far the agent goes on its own overall — AutonomyDial
  • settings for one integration's sync — the integration-settings pattern
<ToolConnections
  connections={connections}
  testing={testingAll}
  onPermissionChange={setPermission}
  onTest={test}
  onReconnect={reconnect}
  available={available}
  onConnect={connect}
/>

When to use

  • settings for which tools an agent may use, per connected account or server
  • checking a connection's health, or fixing a broken one with Reconnect
  • deciding which tools run on their own and which ask first

When not to use

  • finding or connecting a new provider — IntegrationPicker
  • an agent asking for standing access once — PermissionRequest
  • how far the agent goes on its own overall — AutonomyDial
  • settings for one integration's sync — the integration-settings pattern

What an agent reads

import { ToolConnections } from "agentic-ds-kit";
must
  • a small kit Card named by its title (aria-label) with an h3; tools are one list named like the Card; a group of several tools is a list named by its label
  • status is never colour alone: the dot carries its word as hidden text, and the dot and Spinner are aria-hidden
  • the logo is decorative (aria-hidden); the tool or connection name stays the accessible name
  • each tool's permission is a kit SegmentedControl radio group named by the connection and tool ("Slack Post message"), so it reads as "Slack Post message, Ask"
  • on a broken group the switches are disabled and described by the visible error note (aria-describedby), not a hover-only tooltip
  • Reconnect is a kit Button described by the name and the error note; reconnecting sets it busy; when the row is fixed and Reconnect had focus, focus moves to the switch's checked option
  • Test all is a kit Button; while testing it is busy (aria-busy) and keeps focus. The footer status line is visible text, and the tick is aria-hidden
  • Connect a tool is a kit DropdownMenu: arrow keys move through it, Escape closes it and returns focus to its button
  • one polite live region announces only a test result (with the reason when it fails), a reconnect result and a permission change; the first load is never announced
  • motion on live changes only: the dot crossfades, the error note fades in, a reconnected switch rises back in, the footer glides open, the tick draws, Test all eases its width and a just-connected row opens and rises in. All off under prefers-reduced-motion
defaults
  • testing false
stops if
  • Do not invent a local ToolRow, PermissionPicker, StatusDot or ConnectionList; this is the piece
  • Do not wrap it in another Card; it brings its own
  • Do not test, reconnect or store permissions inside the component; the app does it and passes each status in
  • Do not put a solid primary Button on a row; Reconnect is outline neutral
  • Do not show status by colour alone
  • Do not expect brand logos from the kit; it bundles none, so pass your own in logo
  • Do not use raw hex or primitive --color-* ramps

From contracts/toolconnections.json: must is the a11y requirements, defaults the prop defaults, stops if the doNot rules where the agent asks instead of inventing a cousin.

Props

NameTypeRequiredDefaultNotes
connectionsarrayYes—{ id, name, logo?, icon?, account?, status, lastChecked?, error?, tools: { id, name, description?, permission }[] }[], in the order to show. One row per tool; a connection with one tool is one row named by the connection (detail: the tool's description, else the account). A connection with several tools gets a quiet label (name · account) above its rows. error is the plain-words reason on error and disconnected; it replaces the detail line in danger text and is announced after a failed test.
logoslotNo—Per connection: the app's own logo (an inline SVG or element) in the 28px slot on a neutral tile framed like an outline neutral Button (control border, radius and xs shadow), in its own colours. Decorative (aria-hidden); the name stays the accessible name. Without it: icon (an image URL) on the tile, then initials in a square Avatar.
statusconnected | testing | error | disconnectedNo—Each connection's status. A small dot right after each of its tool names: success while connected, danger on error and disconnected, the kit Spinner while testing; the word is hidden text. A tool set to off has no dot and its logo and name dim. error and disconnected replace the detail with the error note and the switch with Reconnect (a group puts both on its label line and locks its rows).
permissionoff | ask | allowNo—Each tool's permission, a kit SegmentedControl sm reading Off, Ask, Allow, named "<name> permission". Each option has a kit Tooltip hint ("Agent can't use it", "Agent asks first", "Agent uses it freely") on hover and keyboard focus.
onPermissionChangefunctionYes—(connectionId, toolId, permission) => void. Applies at once; pass the new permission back in.
onTestfunctionYes—(id?) => void. Test all (ghost neutral sm, in the header) calls it with no id: test every connection, setting each to testing, then connected or error with a reason.
testingbooleanNofalseTrue while a Test all run is in progress: Test all shows its spinner and reads Testing, its width easing to the new words. The footer line (no divider) shows once a run starts: "Testing 4 connections" shimmers, then "4 of 4 healthy" with a drawn tick when all pass. Counts come from the statuses and leave out connections whose tools are all off.
onReconnectfunctionYes—(id) => void. Reconnect (outline neutral sm) shows on error and disconnected. Set it to testing while it reconnects (the Button shows its spinner), then connected; the switch comes back and, if Reconnect had focus, takes it.
onDisconnectfunctionNo—(id) => void. Adds a ghost Ellipsis kit DropdownMenu named "<name> More actions" at the row's end (on a group's label line for several tools) with Disconnect.
availablearrayNo—{ id, name, logo?, description? }[], tools the user can add. With onConnect, a ghost Connect a tool kit DropdownMenu on its own line under the list shows them (name, description, square initials; Escape closes it and returns focus to its button).
onConnectfunctionNo—(id) => void. The user picked an available tool; add it to connections. Its row's height opens, it reads Just connected, and it rises in.
titlestringNo—Card name, heading and list name. Default KitLabels toolConnections ("Tools and connections").
  • Component
    →

    IntegrationPicker

    A filterable catalogue of integrations: search, a category filter with an optional Connected segment, and one tile per provider that ends in a status word (Not connected, Connected, Needs attention, Paused, Connecting…, Coming soon) and at most one action (Connect, Manage, or a sync Switch), with an optional overflow menu in the tile head. connectFlow "detail" opens a Drawer with what it can access and Connect or Disconnect.

  • Component
    →

    PermissionRequest

    An agent asks for standing access to a capability (files, email, repo, billing), scope by scope, with why and expiry.

  • Component
    →

    AutonomyDial

    How far an agent may go without asking: four readable stops on a kit SegmentedControl, with the current stop explained below.

  • Pattern
    →

    Integration settings

    One integration's status and last sync, the sync error with Retry, sync settings, and Disconnect kept away from Save.