Agents

Discover Mcp Tools

Changed on

Discover available tools from an MCP server.

Three callable shapes - see DiscoverMcpToolsRequest for full details:

  • Saved-id: {savedConnectionId} -> Streamkap reads the saved connection and composes its headers server-side; the token never leaves the server. savedConnectionName is accepted as a deprecated alias for one release cycle.
  • Inline with masked secret: {serverUrl, headers: {...: "********"}} -> Streamkap matches serverUrl against saved connections and substitutes the stored secret for every masked header value.
  • Inline plaintext: {serverUrl, headers} - for testing a connection before it is saved.

The URL is validated (SSRF guard) on every path. Per-tenant rate limit: 30 req/min -> 429 with Retry-After. Results are cached for 300s per (serverUrl, headers); X-MCP-Cache: hit|miss is set on every response. Cache hits still count against the rate limit.

post/agents/mcp/tools

Request

Request body

serverUrlstring
headersobject
savedConnectionIdstring nullable

If set, Streamkap uses the serverUrl and headers of the tenant's saved connection with this id

savedConnectionNamestring nullable

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

Response

Successful Response

object required

Changes