Skip to Content
Switchboard

Profiles

A profile is a named set of servers and tools that a client is allowed to see.

A profile is a named selection of tools, such as personal, work or acme. Each client connects to one profile and sees only its tools. You define profiles once, in the web UI or in config.json, instead of switching servers on and off in every client.

"profiles": {
  "work": {
    "servers": ["github", "linear", "sentry"],
    "include": ["notion.search"],
    "exclude": ["github.delete_repository", "sentry.*"],
    "surface": "auto"
  }
}

From the terminal, switchboard profile add work --servers github,linear,sentry --include notion.search --exclude github.delete_repository does the same; run it again, or use profile set, to change a profile.

Which tools a profile has

A profile's tools are worked out in three steps:

  1. Every tool of each server listed in servers.
  2. Plus each tool matched by include, which can add single tools from servers not listed.
  3. Minus each tool matched by exclude. Excludes are applied last, so they always win.

Tools are named server.tool, as in github.create_issue. server.* stands for every tool of a server, and * works as a wildcard in either part, so "exclude": ["sentry.*"] removes all of Sentry's tools and "include": ["github.list_*"] adds GitHub's list tools. Patterns are case-insensitive. A server that is disabled contributes no tools.

The result is computed in memory and updated as soon as a profile or a server's tool list changes. Connected clients get a notifications/tools/list_changed message, so they pick up the change without reconnecting.

Tool names clients see

Clients see each tool as server__tool, as in github__create_issue, so two servers can both have a search tool. Other characters become _, and names are limited to 64 characters; longer names are shortened and given a short hash suffix.

A profile can rename a tool or rewrite its description with overrides, keyed by server.tool:

"overrides": {
  "github.search_issues": { "name": "find_issues", "description": "Search issues in the acme org." }
}

Shared servers

Profiles select tools; they do not start their own copies of servers. Switchboard runs one process per server, shared by every client and profile that uses it:

  • A server starts on the first tool call that needs it, not when the daemon starts.
  • Tool lists come from a cached catalog (catalog.json), so tools/list answers at once even when no server is running. A server whose tools have never been listed is started once to fill the catalog.
  • A server that has had no calls for idleTimeoutSec (10 minutes by default) is stopped.
  • A server that fails to start is retried with backoff, up to 30 seconds between attempts. While it is failing, only its own tools are affected.
  • Ten clients using the same three servers make three processes, not thirty.

Presentation

Each profile also chooses its surface: how its tools are presented to clients. A small profile can list every tool as is; a large one can be served as three search tools or a single code tool. See Tool surfaces.

Choosing a profile per client

A client chooses a profile by its URL, a header, a client rule or the default profile. See Profile resolution.

On this page