T3.Client (T3 v0.3.0)

Copy Markdown View Source

A connection to one T3 /mcp endpoint, backed by ConduitMCP.

connect/1 starts a linked supervised connection; close/1 stops it. Keep the returned client for subsequent calls. Token values may be strings or ConduitMcp.Client.Secret values. No credentials are persisted by T3.Client.

Summary

Functions

Call an advertised tool and return its MCP result envelope.

Stop this connection and terminate its MCP session. Safe to call repeatedly.

List a page of tools; pass nextCursor back as the string-keyed cursor argument.

Types

t()

@type t() :: %T3.Client{
  connected?: term(),
  name: term(),
  protocol_version: term(),
  supervisor: term(),
  timeout: term(),
  token: term(),
  url: term()
}

Functions

call_tool(client, name, arguments \\ %{})

Call an advertised tool and return its MCP result envelope.

close(arg1)

Stop this connection and terminate its MCP session. Safe to call repeatedly.

connect(client)

@spec connect(t()) :: {:ok, t()} | {:error, T3.Error.t()}

list_tools(client, params \\ %{})

List a page of tools; pass nextCursor back as the string-keyed cursor argument.

new(opts)

@spec new(keyword()) :: t()