get_cursor_position
Retrieve the current cursor position in absolute layout coordinates for desktop automation tasks.
Instructions
Get the current cursor position in absolute layout coordinates.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_cursor_position"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- hyprland_mcp/server.py:61-65 (handler)The handler function `get_cursor_position` which executes the tool logic by querying Hyprland's `cursorpos`.
@mcp.tool() async def get_cursor_position() -> str: """Get the current cursor position in absolute layout coordinates.""" pos = await hyprctl.query("cursorpos") return f"Cursor at ({pos['x']}, {pos['y']})"