Skip to main content
Glama

livy_get_session_status

Check Livy session status and details in Microsoft Fabric to monitor session health, verify readiness for code execution, and troubleshoot issues by retrieving state, Spark application information, and configuration.

Instructions

Get the current status and details of a Livy session.

Retrieves detailed information about a session including its state, Spark application details, and configuration. Use this to check session health and readiness.

Session States:

  • 'not_started': Session created but not yet started

  • 'starting': Session is initializing

  • 'idle': Session is ready to accept statements

  • 'busy': Session is currently executing a statement

  • 'shutting_down': Session is terminating

  • 'error': Session encountered an error

  • 'dead': Session has terminated

  • 'killed': Session was forcefully terminated

  • 'success': Session completed successfully

Parameters: workspace_id: Fabric workspace ID. lakehouse_id: Fabric lakehouse ID. session_id: Livy session ID to check.

Returns: Dictionary with session status including state, appId, appInfo, kind, and log.

Example: ```python result = livy_get_session_status( workspace_id="12345678-1234-1234-1234-123456789abc", lakehouse_id="87654321-4321-4321-4321-210987654321", session_id="0" )

if result.get("state") == "idle": # Session is ready to execute code pass elif result.get("state") == "busy": # Session is executing a statement pass ```

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workspace_idYes
lakehouse_idYes
session_idYes

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/bablulawrence/ms-fabric-mcp-server'

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