Skip to main content
Glama
TMYTiMidlY

portal-mcp-server

by TMYTiMidlY

inspect

Retrieve read-only diagnostics of MCP server plumbing and audit history. View connection pool, bash sessions, stats, or security policy via snapshot, server, sessions, history, stats, or policy views.

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 — hosts(action="list") and remote_tunnel(action="list") — NOT here. inspect 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 remote_shell reuses per host). This is plumbing diagnostics — the sessions are implicit, which is why they live in inspect rather than carrying their own list like tunnels/hosts.

  • view="history": last limit audit log entries (default 50). Optional host_filter. Example: inspect(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

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv4.0.3

TDQS

A4.7/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden, and it does so well: it declares 'Read-only' and describes what each view surfaces, including security policy internals (host allowlist, command blocklist, rate limit). It does not discuss auth requirements, error behavior, or any cost/latency beyond calling one view 'cheap', so it falls short of fully compensating for the missing annotations.

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?

Front-loaded with a one-line summary, then a scannable '## Views' list where each bullet earns its place. It is somewhat long and repeats the resource-vs-plumbing distinction twice (the note paragraph and the sessions bullet), which is mild redundancy rather than waste.

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?

An output schema exists, so return values need not be explained; the description focuses on the decision-relevant content — which view to pick and what it contains. For a multi-view introspection tool with an enum selector, nothing an agent needs to call it correctly is missing.

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

Parameters5/5

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

Schema coverage is 0%, so the description must compensate, and it does: it defines all six enum values with behavioral meaning, explains limit as 'last limit audit log entries (default 50)', and documents host_filter as optional with a concrete example. This adds substantial meaning beyond the bare 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?

States a specific verb and resource ('Inspect MCP server internal state and the audit log') and frames itself as the 'read-only introspection hub' for plumbing and history. It explicitly carves out what it does NOT cover, naming sibling tools hosts(action="list") and remote_tunnel(action="list"), so an agent can distinguish it without opening a schema.

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?

Every view has an explicit when-to-use note (e.g., view='server' is 'cheap; use this when you only need to know which version am I talking to?', view='snapshot' is 'for an all-at-once diagnostic'). It also states the negative case — hosts and tunnels live in their own resource tools, not here — leaving nothing to inference.

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