Imp.MCP.Import (Imp v0.5.0)

Copy Markdown View Source

An owned remote tool catalog; cleanup closes its connections.

unavailable is empty unless the import ran with on_failure: :drop, in which case it holds one %{server_name: name, index: index, reason: reason} entry per server that was left out. The tools of every server that did connect are in tools.

index is the position of the dropped descriptor in the list given to Imp.MCP.connect/2, and it is the only thing in the entry that identifies which descriptor was left out. A name does not: names are not required to be unique, and a descriptor with no "name" is reported as "unnamed". server is for the message an operator reads; index is for the caller deciding which of its own descriptors is now absent.

What is left out changes nothing about what the tools beside it are called: names come from the declaration. See "What a tool is named" in Imp.MCP.Connections.

Summary

Types

absence()

@type absence() :: %{
  server_name: String.t(),
  index: non_neg_integer(),
  reason: term()
}

t()

@type t() :: %Imp.MCP.Import{
  annotations: map(),
  cleanup: (-> :ok),
  provenance: map(),
  tools: [Imp.Tool.t()],
  unavailable: [absence()]
}