Skip to main content
Glama

Get Livy Session Status

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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes what the tool does (retrieves session details), includes a comprehensive list of possible session states with explanations, and provides an example showing how to interpret the results. However, it lacks details on error handling, rate limits, or authentication requirements, which are common behavioral traits for API tools.

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 well-structured and appropriately sized. It starts with a clear purpose statement, follows with usage guidance, provides a detailed state reference, lists parameters with semantics, describes returns, and includes a practical code example. Every section adds value without redundancy, and information is front-loaded for quick understanding.

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?

Given the tool's moderate complexity (3 parameters, no annotations, but with output schema), the description is complete. It covers purpose, usage, parameters, return values (including state details), and provides an example. The output schema existence means the description doesn't need to exhaustively document return structure, and it adequately supplements with key return insights like state interpretation.

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 description coverage is 0%, so the description must fully compensate. It explicitly lists all three parameters (workspace_id, lakehouse_id, session_id) with clear semantic explanations ('Fabric workspace ID', 'Fabric lakehouse ID', 'Livy session ID to check'), adding essential context beyond the bare schema. The example further illustrates parameter usage with realistic values.

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 the tool's purpose with specific verbs ('Get', 'Retrieves') and resources ('current status and details of a Livy session', 'detailed information about a session'). It distinguishes itself from siblings like 'livy_list_sessions' (which lists sessions) and 'livy_get_session_log' (which retrieves logs specifically) by focusing on comprehensive session status and health checking.

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

Usage Guidelines4/5

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

The description provides clear context for when to use this tool: 'Use this to check session health and readiness.' It implies usage scenarios (e.g., monitoring session state) but does not explicitly state when NOT to use it or name specific alternatives like 'livy_list_sessions' for broader session overviews, which prevents a perfect score.

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

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