Skip to main content
Glama

KeepPlain

Attach Session To Task

attach_session_to_task

After the user chooses a task to continue, attach the actual current session to it. Use the client and session ID from the local plugin context, never guess IDs. Pass continues: the session_id (from get_task_context) of the session you are continuing, usually the latest one you read; your session then goes on in that session's draft, so one Build shows the work of both agents. This records a private link; it does not upload or publish history.

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": {
      "task_id": "<task_id>",
      "client": "<client>",
      "session_id": "<session_id>"
    },
    "name": "attach_session_to_task"
  }
}

Input Schema

NameRequiredDescriptionDefault
clientYes
task_idYes
continuesNoThe session_id of the task's session you are continuing, from get_task_context sources.
session_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=false and destructiveHint=false; the description goes further by explaining the effect: your session continues inside that session's draft so one Build shows both agents' work, and the link is private with no history upload or publish. Error handling and idempotency are unstated, but the core behavioral outcome is well disclosed and consistent with the annotations.

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 trigger condition is front-loaded and the sentences mostly earn their place, including the useful clarification that one Build shows both agents' work. Minor waste and ambiguity appear in 'attach the actual current session' and the dangling 'Pass continues:' clause.

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?

For a small mutation tool with no output schema, the description covers the trigger, ID sourcing, and the effect of the link. What is missing is whether the task must be in a particular state or what an agent should do if the task already has a session attached.

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 only 25%, so the description must carry the burden. It does explain `continues` (the session_id of the task's session from get_task_context, usually the latest read) and sources for `client`/`session_id`, but `task_id` is only implied by 'the task to continue' and gets no explicit semantics. The awkward 'Pass continues:' phrasing also blurs what is being passed.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a specific verb and resource: attach the current session to a chosen task, triggered 'after the user chooses a task to continue'. It implicitly separates itself from the upload siblings by stating it 'does not upload or publish history', though it never names those siblings explicitly.

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?

The trigger condition is explicit ('after the user chooses a task to continue') and it adds a hard rule against guessing IDs, directing the agent to local plugin context instead. It lacks an explicit negative case or named alternative, which keeps it below a 5.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources