Skip to main content
Glama

Get Livy Session Log

livy_get_session_log

Retrieve Spark driver logs to debug session startup issues, troubleshoot failed statements, and investigate Spark driver problems. Supports incremental reads for paging through logs.

Instructions

Fetch incremental Livy driver logs for a session.

Retrieves Spark driver logs for debugging session startup issues or statement problems. Supports incremental reads with start/size parameters for paging through logs.

Use Cases:

  • Debugging session startup issues

  • Troubleshooting failed statements

  • Investigating Spark driver problems

  • Monitoring session health

Note: Returns driver-side logs only, not executor logs.

Parameters: workspace_id: Fabric workspace ID. lakehouse_id: Fabric lakehouse ID. session_id: Livy session ID. start: Starting log line index (default: 0). size: Number of log lines to retrieve (default: 500).

Returns: Dictionary with log content and metadata: {"status": "success", "log_content": "", "log_size_bytes": , "offset": , "size": }.

Example: ```python # Get first 100 log lines result = livy_get_session_log( workspace_id="12345678-1234-1234-1234-123456789abc", lakehouse_id="87654321-4321-4321-4321-210987654321", session_id="0", start=0, size=100 )

for log_line in result.get("log", []):
    print(log_line)

# Get next 100 lines
result = livy_get_session_log(..., start=100, size=100)
```

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workspace_idYes
lakehouse_idYes
session_idYes
startNo
sizeNo

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 and does well by disclosing key behaviors: it's a read operation (implied by 'Fetch'), supports incremental reads with paging, and specifies log scope (driver-only). It lacks details on permissions, rate limits, or error handling, but covers essential operational traits beyond basic purpose.

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

Conciseness4/5

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

The description is well-structured with sections for purpose, use cases, notes, parameters, returns, and an example. It is appropriately sized and front-loaded with key information, though the example is detailed and could be slightly condensed without losing value.

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 complexity (5 parameters, no annotations, but with output schema), the description is complete: it covers purpose, usage, parameters, return format, and includes an example. The output schema exists, so the description need not explain return values in depth, and it adequately addresses all necessary context for a logging tool.

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 compensate fully. It adds significant meaning by explaining all 5 parameters: workspace_id, lakehouse_id, and session_id as identifiers, and start/size for paging with defaults and usage context. This goes beyond the bare schema, providing practical guidance for each parameter.

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 specific action ('Fetch incremental Livy driver logs') and resource ('for a session'), distinguishing it from sibling tools like 'get_notebook_driver_logs' or 'get_notebook_execution_details' by specifying it's for Livy sessions. The purpose is precise and avoids tautology.

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 explicit use cases (e.g., debugging session startup, troubleshooting failed statements) and notes that it returns driver-side logs only, not executor logs, offering clear context. However, it does not specify when not to use it or name direct alternatives among siblings, such as 'get_notebook_driver_logs' for non-Livy contexts.

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