Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
DESKTOPOS_TOOLSNoComma-separated list of tool groups (shell, desktop, elements, cdp, memory, diagnose) and/or individual tool names to expose. When unset, all tools are exposed. CLI equivalent: --only=<value>.
DESKTOPOS_TOOLS_EXCLUDENoComma-separated list of tool groups and/or tool names to exclude from the exposed tools. Exclusions take priority over DESKTOPOS_TOOLS.

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
shell_execA

在持久化 PowerShell 会话中执行命令。 核心创新:这是一个长期存活的 Shell 进程,不是每次开新进程。 效果:cd 之后目录保持、set 的环境变量保持、Python venv / node -e 等状态保持。 适用于:需要连续操作的场景(先 cd 再 git status、先激活 venv 再 pip install)。

shell_exec_verifiedA

执行命令,并用文件系统 API 独立验证结果;验证不过自动带指数退避重试(自愈雏形)。 不轻信命令自身的返回值:例如 mkdir 之后,真的去确认目录存在。 expect 支持:pathExists / pathNotExists / isDir / isFile / fileContains:[路径,内容] / cwd

shell_cdA

修改持久化会话的工作目录(cd),后续 shell_exec 都在新目录执行。

shell_cwdB

获取持久化会话的当前工作目录。

shell_env_getB

获取持久化会话中的环境变量值。

shell_env_setA

在持久化会话中设置环境变量。后续所有 shell_exec 都能读到。

shell_resetA

重置持久化会话(重新启动 PowerShell)。用于会话状态异常时恢复。

desktop_list_windowsA

结构通道:枚举当前所有可见窗口。 返回句柄、标题、进程名、PID、屏幕矩形、是否聚焦、是否最小化。 用它可以知道"屏幕上有什么",以及目标窗口的位置。

desktop_perceiveA

双通道感知 + 交叉验证(核心能力)。 结构通道枚举窗口,视觉通道对每个窗口区域采样,判断它是否真的可见、真的有内容。 返回每个窗口的一致性结论,并列出不一致原因(minimized / offscreen / blank)。 结果会自动写入记忆层,之后可用 memory_recall 按指代定位。

desktop_screenshotA

视觉通道:截取主屏幕。返回 PNG/JPEG(base64)与尺寸。 用于看布局、颜色、图标等结构通道拿不到的信息。 需要控制消息体积时传 maxWidth(如 1280)+ format:"jpeg"。

desktop_cursorA

读取当前鼠标光标坐标(只读,安全)。

desktop_moveA

移动鼠标到指定坐标(不点击)。副作用小,可用于定位或配合 verify 观察界面反应。

desktop_clickA

在指定坐标点击鼠标。会真实操作你的桌面 —— 调用前请确认目标位置。 坐标可从 desktop_perceive 得到的窗口矩形推算(例如取其中心)。

desktop_typeA

在当前焦点处输入文本,支持中文。 实现走剪贴板 + Ctrl+V(SendKeys 不支持 Unicode,会把中文打成乱码)。 注意:会改动你的剪贴板内容,并输入到当前焦点窗口。

desktop_keyB

发送组合键,如 ctrl+c / ctrl+v / alt+tab / enter / tab / f5。会作用于当前焦点窗口。

desktop_scrollC

在指定坐标滚动滚轮。delta 为负向下、正向上,通常 120 为一格。

desktop_focus_windowA

把指定句柄的窗口切到前台(最小化时会先还原)。句柄来自 desktop_list_windows / desktop_perceive。

desktop_elementsA

元素级结构通道:枚举一个窗口内的 UI 控件(UI Automation)。 返回控件名称、类型(Button/Edit/...)、AutomationId、坐标矩形、是否可 Invoke。 适合定位"确定按钮"这类具体控件,比只按坐标猜可靠得多。 注意:Electron / Chromium 类应用默认不暴露控件树,会返回很少或 0 个 (这类需要用 CDP,即路线图 Week 5-6)。原生 Windows 应用正常。

desktop_click_elementB

元素级执行:按可见文本定位控件并触发它。 优先用 UI Automation 的 InvokePattern(对按钮最可靠),不支持时退回点击其中心。 会真实操作界面,调用前请确认控件名称。

desktop_browser_launchA

启动一个"可被 CDP 调试"的浏览器实例(Edge / Chrome)。 带 --remote-debugging-port 和一次性的 --user-data-dir(不传时每个实例独立目录, 关闭时自动删除),不会抢你正在用的浏览器 profile。 端口只监听 127.0.0.1。返回端口号,之后用 desktop_cdp_open 连它。 headless=true 时不弹窗口,适合自动化;headless=false 时窗口会真的跳出来。

desktop_cdp_targetsA

只读:扫描本机所有开放的 CDP 调试端点及其页面,不做任何修改。 用来判断"现在能不能连浏览器"。 如果为空,说明没有浏览器开调试端口 —— 用 desktop_browser_launch 启动一个。

desktop_cdp_openA

连上一个浏览器的页面,建立 CDP 会话(后续 cdp_* 工具都作用于它)。 可按 title / url 子串或下标选页面;带 url 时会先导航过去。 这是操作 Chromium 系应用(Chrome / Edge / Electron)的入口 —— UIA 看不见它们的内部,CDP 能。

desktop_cdp_elementsB

列出当前页面内的控件(CDP 无障碍树)。 返回角色(button/link/textbox/...)、名称、层级深度。中文名称完整保留。 已自动去重:AX 树给一个按钮同时产出 button/StaticText/InlineTextBox,这里只留能操作的那个。

desktop_cdp_clickA

按名称点击页面里的控件(走 CDP 注入真实鼠标事件)。 先定位控件矩形中心再点,所以不需要你猜坐标。同名多个时会报错并列出候选。

desktop_cdp_typeB

向页面输入文本。走 CDP 的 Input.insertText, 不经过键盘布局,中文 / emoji 天然无损(比 SendKeys 和剪贴板都干净)。 可用 target 先聚焦到某个输入框。

desktop_cdp_evalA

在当前页面执行 JavaScript 并返回结果(JSON 化)。 这是 CDP 相对 UIA 的杀手锏:拿不到的信息可以直接问页面要。

desktop_cdp_screenshotA

截取当前页面(不是整屏)。返回 PNG。 页面级截图比全屏截图更适合判断"浏览器里现在是什么状态"。

desktop_cdp_closeA

关闭 CDP 会话,并杀掉由 desktop_browser_launch 启动的浏览器进程。 用完记得调用,否则无头浏览器会留在后台。

desktop_diagnoseA

把一条报错文本翻译成"为什么 + 怎么办"。 任何工具返回错误时都会自动附带诊断;这个工具用于手动诊断任意一段报错。 规则匹配、毫秒级返回,不调 LLM。

memory_recallB

记忆层:把一句指代解析成可点击的坐标。 支持 "刚才那个窗口"、"钉钉"、"WorkBuddy" 这类说法,返回窗口中心坐标, 可直接拿去 desktop_click。 支持窗口级与元素级两种命中("刚才那个按钮" 会定位到控件)。

memory_timelineB

记忆层:查看最近的操作时间线(感知/点击/输入/命令)。

memory_statsA

记忆层:查看索引规模与最后更新时间。

memory_clearB

记忆层:清空时间线与窗口索引。

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.5/5.0

Scored across 33 tools

Disambiguation4/5

The tool set is large but mostly split into clearly explained channels: persistent shell, window/UIA perception, CDP browser control, and memory. There is still meaningful overlap between shell_exec/shell_exec_verified/shell_cd, desktop_elements/desktop_cdp_elements, and desktop_click/desktop_click_element/desktop_cdp_click, though descriptions give guidance on when to use each.

Naming Consistency4/5

Almost all tools use snake_case with subsystem prefixes (shell_, desktop_, memory_), which makes grouping predictable. Minor deviations exist: some names are verb_noun (desktop_list_windows, shell_env_get) while others are noun-only or verb-only (shell_cwd, shell_reset, memory_timeline).

Tool Count3/5

33 tools is heavy for one server and exceeds the comfortable range, but it is spread across several genuinely distinct subsystems (shell, UIA desktop, CDP browser, memory, diagnostics). It is borderline: more than ideal, but not arbitrary bloat.

Completeness4/5

Coverage is strong for a desktop automation agent: persistent shell with env/CD, verified execution, window enumeration/perception, mouse/keyboard, UIA element interaction, full CDP lifecycle, memory recall, and diagnostics. Gaps remain for window manipulation (move/resize/close), richer mouse actions (right-click/double-click/drag), and file-level operations, but core workflows are covered.

Maintenance

ActivityMaintained
ResponsivenessNo issues