tunnel_list
List active tunneled secrets to view IDs and metadata without exposing sensitive values, helping manage secure connections in the qring-mcp server.
Instructions
List active tunneled secrets (IDs and metadata only, never values).
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/mcp/server.ts:659-679 (handler)MCP tool registration for "tunnel_list" and its handler.
"tunnel_list", "List active tunneled secrets (IDs and metadata only, never values).", {}, async () => { const tunnels = tunnelList(); if (tunnels.length === 0) return text("No active tunnels"); const lines = tunnels.map((t) => { const parts = [t.id]; parts.push(`reads:${t.accessCount}`); if (t.maxReads) parts.push(`max:${t.maxReads}`); if (t.expiresAt) { const rem = Math.max(0, Math.floor((t.expiresAt - Date.now()) / 1000)); parts.push(`expires:${rem}s`); } return parts.join(" | "); }); return text(lines.join("\n")); }, ); - src/core/tunnel.ts:104-131 (helper)The actual implementation of the "tunnel_list" logic which iterates over the memory store.
* List all active tunnel IDs (never exposes values). */ export function tunnelList(): { id: string; createdAt: number; expiresAt?: number; accessCount: number; maxReads?: number; }[] { const now = Date.now(); const result: ReturnType<typeof tunnelList> = []; for (const [id, entry] of tunnelStore) { if (entry.expiresAt && now >= entry.expiresAt) { tunnelStore.delete(id); continue; } result.push({ id, createdAt: entry.createdAt, expiresAt: entry.expiresAt, accessCount: entry.accessCount, maxReads: entry.maxReads, }); } return result; }