Skip to main content
Glama
TMYTiMidlY

portal-mcp-server

by TMYTiMidlY

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_id map 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 limit audit log entries (default 50). Optional host_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

TableJSON Schema
NameRequiredDescriptionDefault
viewNosnapshot
limitNo
host_filterNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description fully carries the behavioral disclosure burden. It explicitly states the tool is read-only, describes what each view returns, and clarifies that sessions are implicit plumbing. No contradictions exist.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with sections for views and a note on resource split. It front-loads the core purpose. While somewhat verbose, every sentence adds value, and the structure aids readability. Slight trimming possible but not necessary.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 3 parameters (none required), high complexity (multiple views, read-only), and an output schema, the description is thorough. It explains all six views, their outputs, usage context, and relationship to sibling tools. It also notes the absence of hosts/tunnels in snapshot, leaving no major gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It explains each view enum value and provides examples for the history view with limit and host_filter. However, it does not explicitly state that limit and host_filter only apply to the history view, leaving minor ambiguity. Overall, it adds significant meaning beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool inspects MCP server internal state and audit log, explicitly distinguishing it from sibling tools portal_host and portal_tunnel by what it excludes. It uses specific verbs like 'Inspect', 'introspect', and 'list' for views, making the purpose unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit when-to-use guidance for each view (e.g., 'Use this for an all-at-once diagnostic', 'cheap; use this when you only need...'). It also tells when NOT to use this tool, directing agents to sibling tools for hosts and tunnels. The read-only nature is stated upfront, aiding correct selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/TMYTiMidlY/portal-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server