Skip to main content
Glama

get_session_status

Check the current session status of a Tauri app. Optionally probe bridge health per window to verify connectivity.

Instructions

Check session (app) status. Use probe_bridge to verify bridge health per window.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
probe_bridgeNoActively probe bridge health per window (adds latency)

Implementation Reference

  • Handler function for the get_session_status tool. Gathers session status from the TauriManager (status, app config, PID, launch time, project root) and optionally probes bridge health via SocketManager. Returns a JSON stringified result.
    get_session_status: async (args: { probe_bridge?: boolean }) => {
      const status = tauriManager.getStatus();
      const config = tauriManager.getAppConfig();
      const pid = tauriManager.getProcessPid();
      const launchedAt = tauriManager.getLaunchedAt();
      const projectRoot = tauriManager.getProjectRoot();
    
      const result: Record<string, unknown> = {
        status,
        app: config ? {
          name: config.packageName,
          binary: config.binaryName,
          directory: config.appDir,
        } : null,
        ...(pid != null && { pid }),
        ...(launchedAt != null && { launchedAt }),
        projectRoot,
      };
    
      // When running and probe requested, check bridge health per window
      if (status === 'running' && args.probe_bridge) {
        try {
          result.bridge = await socketManager.probeBridge();
        } catch {
          // Socket dead or probe failed — omit bridge field (backward compatible)
        }
      }
    
      return {
        content: [
          {
            type: 'text' as const,
            text: JSON.stringify(result, null, 2),
          },
        ],
      };
    },
  • Zod schema for get_session_status tool: defines name, description, and input schema with optional 'probe_bridge' boolean parameter.
    get_session_status: {
      name: 'get_session_status',
      description: 'Check session (app) status. Use probe_bridge to verify bridge health per window.',
      inputSchema: z.object({
        probe_bridge: z.boolean().optional().default(false).describe('Actively probe bridge health per window (adds latency)'),
      }),
    },
  • get_session_status is listed as a default essential tool in DEFAULT_ESSENTIAL_TOOLS. Tools listed here are shown by default unless ESSENTIAL_TOOLS env var overrides.
    const DEFAULT_ESSENTIAL_TOOLS = [
      'get_session_status',
      'start_session',
  • Helper method getStatus() on TauriManager used by the handler to determine the current app status (running/starting/not_running).
    getStatus(): AppStatus {
      if (this.process) {
        if (this.detectedPipePath || this.detectedUnixSocketPath || this.isSocketReady()) {
          return 'running';
        }
        return 'starting';
      }
      return 'not_running';
    }
  • Helper method probeBridge() on SocketManager used by the handler when probe_bridge is true. Sends a 'probe_bridge' command via socket to check bridge health per window.
    async probeBridge(windowLabel?: string): Promise<Record<string, { initialized: boolean; bridge_alive: boolean }>> {
      const params: Record<string, unknown> = {};
      if (windowLabel) params.window = windowLabel;
      const result = await this.sendCommand('probe_bridge', params) as {
        windows: Record<string, { initialized: boolean; bridge_alive: boolean }>;
      };
      return result.windows;
    }
Behavior2/5

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

No annotations are provided, so the description must carry the full burden. It only mentions that probe_bridge adds latency, but does not disclose behavioral traits of this tool itself (e.g., read-only, latency, destructions). The description is too brief to offer adequate transparency.

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

Conciseness5/5

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

The description is exceptionally concise—two short sentences—with no unnecessary words. Every sentence serves a purpose: stating the tool's function and directing to an alternative for a specific use case.

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

Completeness3/5

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

Given no output schema and only one parameter, the description is minimally adequate. It states the purpose and references an alternative, but lacks details on return values, scope of 'session status', or how it fits with other tools. For a tool with 12 siblings, more completenss would help.

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

Parameters3/5

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

Schema description coverage is 100% with one parameter described as 'Actively probe bridge health per window (adds latency)'. The description does not add extra meaning beyond the schema, so it meets the baseline 3 without exceeding.

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 'Check session (app) status' as a specific verb+resource. It further distinguishes from the sibling 'probe_bridge' by directing to use that tool for verifying bridge health per window, avoiding confusion.

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

Usage Guidelines3/5

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

The description provides limited guidance: it tells users to use 'probe_bridge' for bridge health verification, implying this tool is for general session status. However, it does not specify when to choose this over other siblings like get_logs or get_restart_events, leaving some ambiguity.

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/DaveDev42/tauri-plugin-mcp'

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