Skip to main content
Glama

STEM — Persistent AI Memory

Attach a STEM file to a memory

attach_file

Link an existing ready private file to an existing memory in this same STEM account. The file remains private; this does not create a sharing link.

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": {
      "file_id": "<file_id>",
      "memory_id": "<memory_id>"
    },
    "name": "attach_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
file_idYesExisting private STEM file ID returned by upload_file or list_files.
memory_idYes

Output Schema

NameRequiredDescriptionDefault
okNo
fileIdNo
privateNo
memoryIdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4/5.0
Behavior4/5

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

Annotations cover the safety profile (non-read-only, non-destructive), and the description adds meaningful context beyond them: the file stays private and no sharing link is created. It omits what happens if the same file is attached twice (annotations say non-idempotent) or whether an existing attachment is replaced.

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?

Two short sentences, front-loaded with the core action, followed by the privacy clarification. 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 an output schema present and only two required parameters, the description is nearly sufficient. The remaining gap is duplicate/repeat-attach behavior and where a valid memory_id comes from, which an agent could infer from siblings but would prefer stated.

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 50%: file_id is fully documented in the schema, while memory_id has no schema description. The description partially compensates by specifying the memory must exist in 'this same STEM account', but gives no further meaning for memory_id (e.g., valid IDs from recall/memory_status).

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 states a specific verb (link) and both resources (existing private file, existing memory) with scope limited to the same STEM account. It implicitly separates itself from upload_file by requiring a pre-existing file, but never contrasts with the sibling 'link' tool, leaving some ambiguity.

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?

It gives real preconditions: the file must already exist and be 'ready', and the memory must be in the same account. It does not explicitly name alternatives (e.g., upload_file for new files, link for other relations) or say when not to use it, so it falls short of 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