# `MingaAgent.Introspection`
[🔗](https://github.com/jsmestad/minga/blob/main/lib/minga_agent/introspection.ex#L1)

Runtime self-description for external clients.

Produces structured capability manifests, tool descriptions, and
session descriptions. All functions are pure data transforms over
the current registry and session state. No side effects beyond
ETS reads and one GenServer call.

External clients use this to discover what the runtime can do
before making requests. The API gateway exposes these as JSON-RPC
methods.

# `capabilities_manifest`

```elixir
@type capabilities_manifest() :: %{
  version: String.t(),
  tool_count: non_neg_integer(),
  session_count: non_neg_integer(),
  tool_categories: [MingaAgent.Tool.Spec.category()],
  features: [atom()]
}
```

Runtime capabilities manifest.

# `session_description`

```elixir
@type session_description() :: %{
  session_id: String.t(),
  model_name: String.t(),
  status: atom(),
  created_at: String.t()
}
```

Structured session description for external clients.

# `tool_description`

```elixir
@type tool_description() :: %{
  name: String.t(),
  description: String.t(),
  parameter_schema: map(),
  category: MingaAgent.Tool.Spec.category(),
  approval_level: MingaAgent.Tool.Spec.approval_level()
}
```

Structured tool description for external clients.

# `capabilities`

```elixir
@spec capabilities() :: capabilities_manifest()
```

Returns a capabilities manifest describing the runtime.

# `describe_sessions`

```elixir
@spec describe_sessions() :: [session_description()]
```

Returns structured descriptions of all active sessions.

# `describe_tools`

```elixir
@spec describe_tools() :: [tool_description()]
```

Returns structured descriptions of all registered tools.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
