Skip to main content
Glama

upsert_thread

Destructive

Create or update a finishable work thread to track one independently completable outcome, including status, focus, next steps, and resume details.

Instructions

Create a new finishable work thread or explicitly update one.

    One thread should represent one independently finishable outcome, not a
    whole project. Pass thread_id when updating a known thread. For routine
    checkpoints on active work, prefer upsert_progress so progress notes and
    PROGRESS.md stay in sync. Without thread_id, a generated ID may match and
    update an existing thread. Updates apply the status and energy defaults;
    supplied progress fields clear paused_at. Writes update progress/wiki
    files and may sync to a configured forge or refresh scan-line AI.
    

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "summary": "<summary>"
    },
    "name": "upsert_thread"
  }
}

Input Schema

NameRequiredDescriptionDefault
goalNoFinishable outcome; null preserves it on update, empty string clears it.
focusNoCurrent focus, whitespace collapsed and truncated to 500 characters; null or blank preserves existing focus.
energyNoThread energy: low, medium, high or unknown; defaults to unknown, also when updating.unknown
statusNoThread state: open, blocked, done or dismissed; defaults to open, also when updating. Prefer lifecycle tools for closure.open
summaryYesRequired short title for one independently finishable outcome; replaces the title on update.
chat_refNoOptional chat/session reference, not transcript contents; null preserves the existing reference.
thread_idNoExact ID to update (or create if absent); null derives a stable ID from summary and transcript/path/project, which may match existing work.
next_stepsNoOrdered actions; retains the first 3 nonblank entries, each at most 500 characters. Null preserves; [] clears.
resume_stepNoConcrete first action to open, run or check on return; null preserves it, empty string clears it. Coaching is advisory.
source_toolNoOptional originating client/tool name for attribution; null preserves the existing source.
project_slugNoProject identifier; takes precedence over workspace_path and may create a registry entry. Null resolves from path or summary.
blocked_reasonNoCurrent blocker; null preserves it on update, empty string clears it. Does not set status automatically.
transcript_refNoOptional transcript reference, not contents; used in generated thread identity and preserved when null.
workspace_pathNoOptional client workspace folder path used for project resolution and thread identity; retained on update when null.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed14 schema fields changedv0.22.0
    • addedInput schema / properties / blocked_reason / description
      Added value: +"Current blocker; null preserves it on update, empty string clears it. Does not set status automatically."
    • addedInput schema / properties / chat_ref / description
      Added value: +"Optional chat/session reference, not transcript contents; null preserves the existing reference."
    • addedInput schema / properties / energy / description
      Added value: +"Thread energy: low, medium, high or unknown; defaults to unknown, also when updating."
    • addedInput schema / properties / focus / description
      Added value: +"Current focus, whitespace collapsed and truncated to 500 characters; null or blank preserves existing focus."
    • addedInput schema / properties / goal / description
      Added value: +"Finishable outcome; null preserves it on update, empty string clears it."
    • addedInput schema / properties / next_steps / description
      Added value: +"Ordered actions; retains the first 3 nonblank entries, each at most 500 characters. Null preserves; [] clears."
    • addedInput schema / properties / project_slug / description
      Added value: +"Project identifier; takes precedence over workspace_path and may create a registry entry. Null resolves from path or summary."
    • addedInput schema / properties / resume_step / description
      Added value: +"Concrete first action to open, run or check on return; null preserves it, empty string clears it. Coaching is advisory."
    • addedInput schema / properties / source_tool / description
      Added value: +"Optional originating client/tool name for attribution; null preserves the existing source."
    • addedInput schema / properties / status / description
      Added value: +"Thread state: open, blocked, done or dismissed; defaults to open, also when updating. Prefer lifecycle tools for closure."
    • addedInput schema / properties / summary / description
      Added value: +"Required short title for one independently finishable outcome; replaces the title on update."
    • addedInput schema / properties / thread_id / description
      Added value: +"Exact ID to update (or create if absent); null derives a stable ID from summary and transcript/path/project, which may match existing work."
    • addedInput schema / properties / transcript_ref / description
      Added value: +"Optional transcript reference, not contents; used in generated thread identity and preserved when null."
    • addedInput schema / properties / workspace_path / description
      Added value: +"Optional client workspace folder path used for project resolution and thread identity; retained on update when null."
  2. First observedv0.12.0

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already flag non-read-only, destructive, and non-idempotent, so the description adds genuinely new behavioral information: 'Without idempotency, a generated name/key may collide' — specifically that omitting thread_id can silently match and overwrite an existing thread. It also discloses side effects (writes to progress/files, optional forge sync, scan-line AI refresh) and the subtle rule that supplied progress fields clear paused_at, plus that updates reapply status/energy defaults.

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 core distinction (create vs update) is front-loaded, and each subsequent sentence carries a distinct rule (unit of work, thread_id, sibling alternative, defaults, side effects). It is slightly dense and could be tightened — the closing sentence about forge sync and scan-line AI is somewhat tangential — but there is no filler.

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?

With 14 parameters, destructiveHint=true, and an existing output schema, the description covers the semantically hard parts: create-vs-update intent, ID derivation and collision, defaulting behavior, and file/forge side effects. The notable gap is that destructiveHint=true is never explained in terms of what data an accidental ID match could overwrite, which matters for a tool that may mutate an existing thread.

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 coverage is 100%, so per the rubric the baseline is 3 even with no parameter discussion. The description does add cross-parameter behavior the schema cannot express — the thread_id collision risk, and that updates apply status/energy defaults and clear paused_at when progress fields are supplied — which is useful but not enough to lift it above baseline given how thoroughly the schema already documents each field. No enum or format details are added beyond 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?

The opening sentence names both verbs and the resource precisely ('Create a new finishable work thread or explicitly update one'), and the second sentence defines the unit of work ('one independently finishable outcome, not a whole project'). This distinguishes it from siblings like upsert_progress and the lifecycle tools without requiring the schema to be opened.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives an explicit routing rule ('Pass thread_id when updating a known thread') and names an alternative with the condition that selects it ('For routine checkpoints on active work, prefer upsert_progress so progress notes and PROGRESS.md stay in sync'). The agent knows both when to use this tool and when to defer to a sibling.

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