portal_audit
Inspect MCP server internal state and audit log to diagnose connection pools, bash sessions, security policy, and operational history.
Instructions
Inspect MCP server internal state and the audit log — the read-only introspection hub for plumbing (the connection pool, persistent bash sessions) and history (audit log, stats, policy).
Note the "resource vs plumbing" split: things the agent manages explicitly (registered hosts, open tunnels) are listed by their own resource tools — portal_host(action="list") and portal_tunnel(action="list") — NOT here. portal_audit only surfaces server-internal plumbing the agent never explicitly creates.
Views
view="snapshot" (default): server metadata + connection pool + bash sessions + audit stats + security policy summary. Use this for an all-at-once diagnostic. (Hosts and tunnels are intentionally absent — see the note above.)
view="server": just the server-level metadata (version, python_version, pid, started_at, uptime_s, transport, resolved config paths). Cheap; use this when you only need to know "which version am I talking to?" without pulling the full snapshot.
view="sessions": the
host → session_idmap of cached persistent bash sessions (what portal_shell reuses per host). This is plumbing diagnostics — the sessions are implicit, which is why they live in portal_audit rather than carrying their own list like tunnels/hosts.view="history": last
limitaudit log entries (default 50). Optionalhost_filter. Example: portal_audit(view="history", limit=20, host_filter="web01")view="stats": aggregate audit stats (counts by operation, error rate, etc.).
view="policy": current security policy details (host allowlist, command blocklist, allowlist, rate limit).
Read-only. Used to introspect what the MCP server has been doing and what limits are in place.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| view | No | snapshot | |
| limit | No | ||
| host_filter | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |