Skip to main content
Glama

niri_focus_window

Focus a Niri window by numeric ID or by search query matching its title or app_id (e.g., 'firefox').

Instructions

Focus a window in Niri. Provide window_id (numeric ID) OR search_query (matches window title or app_id like 'firefox', 'terminal', 'code').

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
window_idNo
search_queryNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

With no annotations provided, the description must disclose behavioral traits. It reveals the OR requirement between window_id and search_query, which is useful. However, it does not disclose what happens when both are provided, when neither is provided, or how ambiguous matches are handled. While focusing is not a destructive operation, the lack of edge-case behavior is a transparency gap.

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, front-loaded with the main purpose, and every word contributes to understanding the tool's core function. There is no redundant or vague language.

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

Completeness4/5

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

Given the tool's simplicity (two optional parameters, no nested objects) and the presence of an output schema, the description covers the essential usage pattern and parameter semantics. It does not explain edge cases like what happens if neither parameter is given, but for a focus operation this is a minor omission. Overall, it is sufficiently complete for an agent to select and 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 schema provides only types and defaults (0% coverage), but the description compensates by explaining that window_id is a numeric ID and search_query matches title or app_id, with concrete examples like 'firefox', 'terminal', 'code'. It adds meaningful semantics beyond the schema, though it doesn't specify matching behavior (e.g., substring vs exact match).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Focus a window') and the resource (window in Niri), which is distinct from sibling tools like niri_focus_workspace or niri_move_window_to_workspace. It could be more explicit about being the go-to tool for focusing a specific window rather than a workspace, but the verb+resource pairing is specific enough.

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 usage context by explaining how to specify the target via window_id or search_query, implying when to use this tool. However, it does not explicitly state when to use it over alternatives, nor does it mention exclusions or prerequisites such as needing to obtain window IDs from niri_get_windows. This is implied rather than clearly stated.

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/oki3505F/arch-niri-mcp'

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