tunnel_list
List active tunneled secrets to view IDs and metadata without exposing sensitive values, helping manage secure API key storage.
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:390-411 (handler)MCP tool registration and handler for 'tunnel_list'.
server.tool( "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:106-131 (handler)Core implementation function for listing tunneled secrets.
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; }