# toolnexus v0.9.4 - Table of Contents

> Your LLM, with MCP tools and agent skills built in — vendor-neutral, byte-identical across six languages.

## Pages

- [toolnexus (Elixir)](readme.md)

## Modules

- [Toolnexus](Toolnexus.md): Your LLM, with MCP tools and agent skills built in — the top-level API.
- [Toolnexus.A2a](Toolnexus.A2a.md): A2A (agent-to-agent) — OUTBOUND: call remote A2A agents (SPEC §7A).
- [Toolnexus.Adapters](Toolnexus.Adapters.md): Provider adapters — turn the uniform tool list into each LLM's tool schema (SPEC §0.7).
- [Toolnexus.Answer](Toolnexus.Answer.md): A §10 answer: `{id, ok, data?}` — keys byte-identical across ports.
- [Toolnexus.Builtin](Toolnexus.Builtin.md): Built-in tool source (`source: "builtin"`) — SPEC §4A.
- [Toolnexus.Client](Toolnexus.Client.md): Unified LLM client — the host loop (SPEC §8, §10).
- [Toolnexus.Client.ConversationStore](Toolnexus.Client.ConversationStore.md): Where `ask/4` conversations are remembered — two callbacks (SPEC §8 Conversation memory).
- [Toolnexus.Client.InMemoryConversationStore](Toolnexus.Client.InMemoryConversationStore.md): Default conversation provider — keeps transcripts in memory for the client's lifetime.
- [Toolnexus.Client.RunResult](Toolnexus.Client.RunResult.md): Full outcome + telemetry of one `run`/`ask` (SPEC §8, §10).
- [Toolnexus.Context](Toolnexus.Context.md): Execution context passed to every tool (SPEC §1).
- [Toolnexus.Http](Toolnexus.Http.md): HTTP / REST tools — declare a remote endpoint as a uniform `Toolnexus.Tool` (SPEC §7).
- [Toolnexus.Mcp](Toolnexus.Mcp.md): Dynamic MCP source (SPEC §2, §0.2–0.4). Mirrors js/src/mcp.ts: parse an
`mcp.json` (path | raw JSON string | map; top-level `mcpServers`|`servers`|`mcp`
accepted), connect to every enabled server (local stdio + remote
streamable-HTTP) with per-server failure isolation, list tools (cursor
pagination), and expose each as a uniform `Toolnexus.Tool` named
`sanitize(server)_sanitize(tool)`.
- [Toolnexus.Mcp.Connection](Toolnexus.Mcp.Connection.md): One GenServer per configured MCP server (SPEC §2). Owns the transport
(stdio port or streamable-HTTP state), correlates JSON-RPC request ids with
per-call timeouts (config `timeout`, default 30000 ms), performs the
`initialize` handshake, paginates `tools/list`, executes `tools/call`, and
bridges inbound `elicitation/create` onto the host `wait_for` (§2 + §10):
form → `kind:"input"`, URL → `kind:"authorization"`; no `wait_for` ⇒ decline.
- [Toolnexus.Mcp.Inventory](Toolnexus.Mcp.Inventory.md): §2 Gap 6: list-only inventory — original unprefixed tool defs per server.
- [Toolnexus.Mcp.Protocol](Toolnexus.Mcp.Protocol.md): Pure JSON-RPC 2.0 codec for the in-house MCP client (SPEC §2).
- [Toolnexus.Mcp.Source](Toolnexus.Mcp.Source.md): A loaded MCP source: tools, per-server status, and its own supervisor.
- [Toolnexus.Mcp.Transport.Sse](Toolnexus.Mcp.Transport.Sse.md): Incremental server-sent-events parser: feed chunks, collect complete events.
MCP-style streams (`event:`/`data:` lines, no `[DONE]` sentinel).

- [Toolnexus.Mcp.Transport.Stdio](Toolnexus.Mcp.Transport.Stdio.md): Stdio transport for a local MCP server (SPEC §2 "local").
- [Toolnexus.Mcp.Transport.StreamableHttp](Toolnexus.Mcp.Transport.StreamableHttp.md): Streamable-HTTP transport for a remote MCP server (SPEC §2 "remote"), built
on Req. POSTs JSON-RPC to the configured url with the configured headers
(after `${ENV_VAR}` expansion — values are never logged), accepts either a
JSON response or an SSE stream, carries the `Mcp-Session-Id` response header
onto subsequent requests, and DELETEs the session on close.
- [Toolnexus.McpServe](Toolnexus.McpServe.md): MCP — INBOUND: serve a toolkit as an MCP server (SPEC §7C).
- [Toolnexus.Native](Toolnexus.Native.md): Native tools — turn a plain function into a uniform `Toolnexus.Tool` (SPEC §6).
- [Toolnexus.Request](Toolnexus.Request.md): A §10 suspension request. JSON keys are byte-identical across ports:
`{id, kind, prompt, url?, data?, expiresAt?}`.

- [Toolnexus.Serve](Toolnexus.Serve.md): A2A (agent-to-agent) — INBOUND: serve a toolkit as a remote A2A agent
(SPEC §7B), with the MCP profile co-mounted at `/mcp` (SPEC §7C).
- [Toolnexus.Serve.FileTaskStore](Toolnexus.Serve.FileTaskStore.md): File-backed store — one JSON file per Task id, under `dir`.
- [Toolnexus.Serve.Handle](Toolnexus.Serve.Handle.md): Handle returned by `serve` — the base URL + port plus stop/close.
- [Toolnexus.Serve.InMemoryTaskStore](Toolnexus.Serve.InMemoryTaskStore.md): Default store — Tasks live only for the lifetime of the process.
- [Toolnexus.Serve.TaskStore](Toolnexus.Serve.TaskStore.md): Pluggable Task persistence: `get(store, id)` and `save(store, task)`.
- [Toolnexus.Skill](Toolnexus.Skill.md): Dynamic agent-skill source (SPEC §3). Mirrors `js/src/skill.ts`:
discover `**/SKILL.md`, parse frontmatter, and expose ONE `skill` tool that
loads a skill's instructions + sampled resources on demand (progressive
disclosure).
- [Toolnexus.Skill.Info](Toolnexus.Skill.Info.md): One discovered skill (SPEC §3).
- [Toolnexus.Skill.Source](Toolnexus.Skill.Source.md): The built skill source: skills + the single `skill` tool + system-prompt catalog.
- [Toolnexus.Tool](Toolnexus.Tool.md): The uniform tool: a named, described, JSON-Schema'd callable (SPEC §1).
- [Toolnexus.ToolResult](Toolnexus.ToolResult.md): Uniform tool result (SPEC §1). `metadata.pending` carrying a Request = suspension (§10).
- [Toolnexus.Toolkit](Toolnexus.Toolkit.md): Toolkit — aggregates dynamic MCP tools + the skill tool + built-ins + remote
A2A agents + custom tools into a single uniform list, with provider adapters
and a single `execute/4` router (SPEC §4).

