Skip to main content
Glama

attach_memory_block

Idempotent

Attaches an existing memory block, identified by label, to a thread as a shared object without changing its value; unknown labels are refused.

Instructions

Attach a memory block, named by label, to a thread so the thread carries it as a shared object: how a parent hands a block to a child. Returns {attached: true} when newly attached and {attached: false} when it was already attached. The block must already exist in your workspace (create_memory_block makes one; an unknown label is refused), and attaching never changes its value. list_thread_memory_blocks shows what a thread carries and detach_memory_block removes the link. Requires workspace:write.

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": {
      "thread_id": "<thread_id>",
      "label": "<label>"
    },
    "name": "attach_memory_block"
  }
}

Input Schema

NameRequiredDescriptionDefault
labelYesLabel of an existing memory block in your workspace (surrounding whitespace is ignored). An unknown label is refused.
thread_idYesUUID of the thread to attach the block to. You must be able to read it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv479.0.2
    • addedInput schema / properties / label / description
      Added value: +"Label of an existing memory block in your workspace (surrounding whitespace is ignored). An unknown label is refused."
    • addedInput schema / properties / thread_id / description
      Added value: +"UUID of the thread to attach the block to. You must be able to read it."
  2. First observedv479.0.0

TDQS

A4.5/5.0
Behavior4/5

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

The annotations already declare idempotentHint=true and destructiveHint=false, but the description still earns credit by spelling out the concrete return contract ({attached: true} newly attached vs {attached: false} already attached), which makes the idempotency observable, and by stating that attaching never changes the block's value and requires workspace:write. It stops short of describing failure behavior for the read-permission case or concurrency, which keeps it at 4 rather than 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, front-loaded with the action and the mental model, then contract, then prerequisites, then siblings. No clause is filler; the parent/child framing removes ambiguity in a single phrase.

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 supplies the return shape itself, and with all safety-relevant behavior covered by annotations plus the stated permission requirement, an agent has everything needed to decide and call correctly.

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 both parameters already carry their own documentation including the unknown-label refusal, whitespace handling, and the read-permission note on thread_id. The description restates rather than adds to that, so the 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?

The description names a specific verb and resource ("Attach a memory block ... to a thread") and adds the semantic model ("how a parent hands a block to a child"), making clear this creates a shared-object link rather than a copy. It is trivially distinguishable from create_memory_block, detach_memory_block, and list_thread_memory_blocks, which it explicitly names.

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 the precondition (the block must already exist; an unknown label is refused), points to create_memory_block for the create path, and routes to detach_memory_block and list_thread_memory_blocks for the adjacent operations. It also states the required permission (workspace:write), so the agent knows whether it can call it at all.

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

Deploy Server

Other Tools