Skip to main content
POST
Discover Mcp Tools

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Request body for POST /agents/mcp/tools.

Two callable shapes:

  1. Inline - the caller sends {serverUrl, headers} directly. Used for the "Test" button on a new connection form before the row has been saved. If any header value is MASK_SENTINEL, the BE substitutes the stored secret for that row (matched by serverUrl) server-side so the decrypted value never reaches the browser.
  2. By saved-id - the caller sends savedConnectionId and the BE reads the stored row from agent_connections and composes headers via mcp_header_resolver. Used when the tenant triggers a re-discover against an existing saved connection - the browser doesn't need to hold the token at all. For MCP connections (which are keyed by name in storage), the value sent as savedConnectionId is the connection's stable name.

savedConnectionName is accepted as a deprecated alias for one release cycle so an in-flight FE that hasn't shipped the rename yet keeps working. New callers should send savedConnectionId.

serverUrl
string
default:""
Maximum string length: 2048
headers
Headers · object
savedConnectionId
string | null

If set, BE resolves serverUrl + headers from the tenant's saved connection by id

Maximum string length: 100
savedConnectionName
string | null

Deprecated - prefer savedConnectionId. Accepted for backward compatibility for one release cycle.

Maximum string length: 100

Response

Successful Response

The response is of type Response Discovermcptools · object.