Skip to main content
Glama

dsh_list

List agent sessions with their states—running, idle, or detached—to monitor multiple concurrent coding sessions. Filter to running-only or probe disk sessions to find resumable ones.

Instructions

列出会话及其运行状态,用来掌控多个会话实例。state: running(正在跑回合)/ idle(进程活着但空闲)/ detached(进程没开,可 resume 复活)。running 的会话会带上已跑时长、当前正在执行的工具、本轮已产出字数。数据来自两路合并:本服务持有的 + DSH 磁盘上尚未打开的(DSH 的 session/list 会排除已打开的会话)。想只看正在跑的,传 only_running=true;想看某个会话当前吐出的内容,接着用 dsh_read。

Input Schema

NameRequiredDescriptionDefault
cwdNo只看某个工作区下的会话。
only_runningNo只返回正在跑回合的会话,默认 false。**此模式自动跳过磁盘探测,毫秒级**(正在跑的会话必然在内存里)。
include_closedNo是否包含磁盘上未打开的会话(含别的实例 / GUI 建的),默认 true。**代价:要 spawn 一个 DSH 进程去探测磁盘,实测约 1 秒**(结果缓存 10 秒)。只列本服务已打开的会话就传 false,毫秒级。

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses the two-source data merge (in-memory sessions + not-yet-opened sessions on DSH disk), notes that DSH's session/list excludes already-open sessions, and gives concrete cost figures (~1s disk probe, 10s cache) with the only_running fast path. It omits ordering/pagination and any permission requirements.

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 purpose and state list are front-loaded, then filters, then the next-step pointer. Dense but every sentence carries operational information; the cached-duration detail is slightly more than needed for selection.

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?

No output schema and no annotations exist, yet the description tells the agent what running sessions return (elapsed time, currently executing tool, words produced this turn) and where data originates. Sufficient to call and interpret the result; minor gaps around ordering and result limits.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents all three parameters including their performance tradeoffs. The description adds the state enumeration and the data-merge context useful for interpreting include_closed, but repeats the only_running guidance rather than adding new parameter semantics. Baseline 3 applies.

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?

States a specific verb+resource: list sessions and their run state, with the stated purpose of managing multiple session instances. It defines the state vocabulary (running/idle/detached) so the agent knows exactly what 'run state' means, distinguishing it from siblings like dsh_status or dsh_read.

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?

Explicitly routes the agent: use only_running=true to see only active sessions, and use dsh_read next to see a session's output. It does not address when to prefer dsh_get/dsh_status over this tool, so it falls short of full alternative coverage.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.