Skip to main content
Glama

dsh_list_sessions

Read-onlyIdempotent

List Harness sessions newest first to find a session_id and inspect title, workspace, update time, running state, bridge runs, and model. Filter by workspace or query; archived sessions are excluded.

Instructions

List Harness sessions, newest first, to find a session_id: session_id, title, cwd, updated_at, running, bridge_runs and model (what its next request uses). No paging: raise limit or narrow it with cwd or query. Read-only. Sessions not in dsh_list_sessions are archived or gone: do not look for them on disk.

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": "dsh_list_sessions"
  }
}

Input Schema

NameRequiredDescriptionDefault
cwdNoOnly sessions of this workspace folder
limitNoMax sessions returned
queryNoCase-insensitive text to match in title, folder or session id
include_subagentsNoAlso list sub-agent sessions

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.6.4
    • changedInput schema / properties / limit / description
      Previous value: -"Max sessions"New value: +"Max sessions returned"
    • changedInput schema / properties / query / description
      Previous value: -"Filter by text in title or folder"New value: +"Case-insensitive text to match in title, folder or session id"
  2. First observedv0.5.4

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint and closed-world, so the bar is lower; the description still adds real value with newest-first ordering, the no-pagination behavior, and the archived/deleted semantics. 'Read-only' merely repeats the annotation, but the surrounding behavioral context is substantive.

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?

Front-loaded with the verb and resource, then returns, then guidance, then the archived caveat — every sentence carries information. The inline field list is dense and the standalone 'Read-only.' duplicates the annotations, keeping it just short of ideal.

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?

With no output schema, the description compensates by naming the returned fields, and it covers ordering, result-size control, and the fate of missing sessions. For a four-parameter read tool with full annotation coverage, an agent has everything needed to call 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?

Schema coverage is 100%, so baseline is 3, but the description adds meaning beyond the schema by explaining the limit/cwd/query tradeoff for result volume. It does not mention include_subagents, which is left entirely to the schema.

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 and resource ('List Harness sessions, newest first') plus the purpose ('to find a session_id') and enumerates the returned fields. This clearly separates it from dsh_list_workspaces and dsh_read_session without the agent needing to open another schema.

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?

Gives concrete operating guidance: no paging, so 'raise limit or narrow it with cwd or query', and a negative rule that sessions absent from this list are archived or gone, so don't search on disk. It stops short of routing to siblings (e.g., use dsh_read_session for details), so it's clear context rather than full alternative coverage.

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