Skip to main content
Glama

get_desktop_session_info

Identify the active Linux GUI session by retrieving its display protocol (Wayland/X11) and desktop environment from read-only environment variables, ensuring reliable context.

Instructions

Returns display protocol (Wayland/X11), desktop environment, and related environment config. Read-only from environment variables; never fails. Use to understand the GUI session the server runs under.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorsNo
displayYes
runtime_dirYes
session_typeYes
current_desktopYes
wayland_displayYes
Behavior5/5

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

With no annotations, the description carries full responsibility and does so excellently: it states the tool is read-only from environment variables and never fails. This directly informs the agent about safety and reliability without needing separate annotations.

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 two sentences: the first states what it returns, the second covers behavior and usage. Every word earns its place; it is front-loaded with the core purpose and includes no filler.

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 has no parameters and an output schema exists, the description is complete: it explains purpose, behavior, and when to use it. Nothing relevant is missing for an agent to invoke it correctly.

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

Parameters4/5

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

The tool has zero parameters, so the baseline is 4. The description adds no parameter-specific details because none exist, which is appropriate. The schema coverage is vacuously 100%, and the description focuses on output and behavior.

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 returns display protocol (Wayland/X11), desktop environment, and related environment config. The verb 'returns' and specific resource make the purpose unmistakable, and it is distinct from the many other get_* sibling tools.

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?

Provides an explicit use case: 'Use to understand the GUI session the server runs under.' It does not explicitly mention alternatives or when not to use, but the context is clear and sufficient for an agent to decide.

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/Mohabdo21/linux-mcp'

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