Skip to main content
Glama

write_task_memory

Save reusable task memories as ChatCrystal notes with specific titles, summaries, key conclusions, and durable lessons like pitfalls, fixes, patterns, or decisions to recall in future sessions.

Instructions

Persist a task memory only when it can become a high-quality ChatCrystal note: specific title, concrete summary, meaningful key conclusions, and a durable reusable lesson such as a pitfall, fix, decision, pattern, or symptom-to-resolution mapping. Do not write one-time environment checks, version/status reports, ordinary progress logs, or vague robustness claims. Weak auto writebacks are skipped by core validation and recorded only as receipts.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeYesUse auto for agent-generated writebacks and manual for explicit user-curated memories.
taskYesCurrent task context used to scope, rank, and store memories.
scopeNoStore as project memory by default; global is reserved for broadly reusable manual lessons.
memoryYesCandidate ChatCrystal note content to validate or persist as reusable task memory.
source_run_keyNoIdempotency key for auto writebacks; required in auto mode to avoid duplicate memory receipts.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed30 schema fields changedv0.5.6
    • addedInput schema / properties / memory / description
      Added value: +"Candidate ChatCrystal note content to validate or persist as reusable task memory."
    • addedInput schema / properties / memory / properties / code_snippets / description
      Added value: +"Small snippets that make the memory actionable without copying large files."
    • addedInput schema / properties / memory / properties / code_snippets / items / properties / code / description
      Added value: +"Minimal code, command, config, or query that illustrates the reusable lesson."
    • addedInput schema / properties / memory / properties / code_snippets / items / properties / description / description
      Added value: +"Why this snippet matters and when to reuse it."
    • addedInput schema / properties / memory / properties / code_snippets / items / properties / language / description
      Added value: +"Programming or markup language for the snippet."
    • addedInput schema / properties / memory / properties / decisions / description
      Added value: +"Durable design, product, architecture, or process decisions made during the task."
    • addedInput schema / properties / memory / properties / error_signatures / description
      Added value: +"Exact errors or symptoms that should trigger this memory in future debug recall."
    • addedInput schema / properties / memory / properties / files_touched / description
      Added value: +"Files that provide useful provenance for the memory."
    • addedInput schema / properties / memory / properties / key_conclusions / description
      Added value: +"Important takeaways that should be recalled before similar future work."
    • addedInput schema / properties / memory / properties / outcome_type / description
      Added value: +"Primary kind of reusable memory being saved."
    • addedInput schema / properties / memory / properties / pitfalls / description
      Added value: +"Mistakes, traps, or failure modes future agents should avoid."
    • addedInput schema / properties / memory / properties / resolution / description
      Added value: +"Specific fix or action that resolved the issue."
    • addedInput schema / properties / memory / properties / reusable_patterns / description
      Added value: +"Generalizable implementation, debugging, migration, or configuration patterns."
    • addedInput schema / properties / memory / properties / root_cause / description
      Added value: +"Underlying cause of the problem when the memory is about a fix or pitfall."
    • addedInput schema / properties / memory / properties / summary / description
      Added value: +"Concrete summary of what was learned or decided, written so it remains useful in a later session."
    • addedInput schema / properties / memory / properties / tags / description
      Added value: +"Short tags for retrieval, such as framework, subsystem, source tool, or failure type."
    • addedInput schema / properties / memory / properties / title / description
      Added value: +"Specific note title. Prefer the durable lesson over a generic task name."
    • addedInput schema / properties / mode / description
      Added value: +"Use auto for agent-generated writebacks and manual for explicit user-curated memories."
    • addedInput schema / properties / scope / description
      Added value: +"Store as project memory by default; global is reserved for broadly reusable manual lessons."
    • addedInput schema / properties / source_run_key / description
      Added value: +"Idempotency key for auto writebacks; required in auto mode to avoid duplicate memory receipts."
    • addedInput schema / properties / task / description
      Added value: +"Current task context used to scope, rank, and store memories."
    • addedInput schema / properties / task / properties / branch / description
      Added value: +"Current VCS branch when relevant to the task."
    • addedInput schema / properties / task / properties / cwd / description
      Added value: +"Current working directory of the agent session."
    • addedInput schema / properties / task / properties / error_signatures / description
      Added value: +"Concrete errors, stack traces, failing commands, or symptoms. Most useful with debug tasks."
    • addedInput schema / properties / task / properties / files_touched / description
      Added value: +"Files already touched or expected to be touched; improves project memory matching."
    • addedInput schema / properties / task / properties / goal / description
      Added value: +"Plain-language task goal or user request. Include enough context to retrieve relevant memories."
    • addedInput schema / properties / task / properties / project_dir / description
      Added value: +"Absolute project directory when known; helps ChatCrystal match memories to the right local workspace."
    • addedInput schema / properties / task / properties / project_key / description
      Added value: +"Stable project identifier used to prioritize project-scoped memories, such as a repository or workspace key."
    • addedInput schema / properties / task / properties / source_agent / description
      Added value: +"AI coding tool or agent that is calling ChatCrystal; use unknown when unsure."
    • addedInput schema / properties / task / properties / task_kind / description
      Added value: +"Kind of work being performed. Use debug for failures; choose the closest non-debug category for planned work."
  2. First observedv0.5.5

TDQS

A3.6/5.0
Behavior3/5

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

Discloses quality validation and skip behavior for weak entries, but with no annotations, it misses details like side effects, auth requirements, rate limits, or error handling. The description carries the full burden due to missing 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?

Description is a single paragraph that is front-loaded with purpose and criteria. It includes examples and exclusions without excessive verbosity. Could be slightly more concise but effectively conveys key information.

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?

Given the complex nested parameters and no output schema, the description covers purpose, usage conditions, and quality expectations. It lacks explanation of return values (receipts) but otherwise is fairly complete.

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 description coverage is 100%, so parameters are well-documented in the schema. The description adds context on quality criteria but does not enhance parameter meaning beyond what the schema provides. Baseline 3 is appropriate.

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 clearly states the tool persists high-quality task memories as ChatCrystal notes with specific criteria (title, summary, conclusions, reusable lesson). It distinguishes from weak auto writebacks but does not explicitly differentiate from sibling tools like validate_task_memory or recall_for_task.

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?

Provides explicit when-to-use (only for high-quality, durable lessons) and when-not-to-use (one-time checks, status reports, vague claims). Mentions that weak writebacks are skipped. Lacks explicit alternatives or comparison to sibling tools.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ZengLiangYi/ChatCrystal'

If you have feedback or need assistance with the MCP directory API, please join our Discord server