ReqAnthropic.Vaults (ReqAnthropic v0.2.1)

Copy Markdown View Source

The Managed Agents Vaults API: store third-party credentials that sessions can use to authenticate with MCP servers at runtime. Credentials themselves are managed by ReqAnthropic.Vaults.Credentials.

{:ok, vault} = ReqAnthropic.Vaults.create(display_name: "Alice")

{:ok, _cred} =
  ReqAnthropic.Vaults.Credentials.create(vault["id"],
    display_name: "Alice's Slack",
    auth: %{
      type: "static_bearer",
      mcp_server_url: "https://mcp.slack.com/mcp",
      token: "xoxp-..."
    }
  )

Summary

Functions

Archive a vault. Cascades to all credentials in the vault.

Hard-delete a vault. Use archive/2 when you need an audit trail.

Functions

archive(id, opts \\ [])

@spec archive(
  String.t(),
  keyword()
) :: {:ok, map()} | {:error, ReqAnthropic.Error.t() | Exception.t()}

Archive a vault. Cascades to all credentials in the vault.

create(opts)

@spec create(keyword()) ::
  {:ok, map()} | {:error, ReqAnthropic.Error.t() | Exception.t()}

delete(id, opts \\ [])

@spec delete(
  String.t(),
  keyword()
) :: {:ok, map()} | {:error, ReqAnthropic.Error.t() | Exception.t()}

Hard-delete a vault. Use archive/2 when you need an audit trail.

get(id, opts \\ [])

@spec get(
  String.t(),
  keyword()
) :: {:ok, map()} | {:error, ReqAnthropic.Error.t() | Exception.t()}

list(opts \\ [])

@spec list(keyword()) ::
  {:ok, map()} | {:error, ReqAnthropic.Error.t() | Exception.t()}

update(id, opts)

@spec update(
  String.t(),
  keyword()
) :: {:ok, map()} | {:error, ReqAnthropic.Error.t() | Exception.t()}