Skip to main content
Glama

Awareness — Memory, Knowledge & Agent Markets

awareness_record

Save memory — pass ONE content string, server handles the rest.

Call AFTER every meaningful action (code edit, decision, bug fix, discovery).
If you don't record it, it's lost forever in the next session.

PRIMARY USAGE (single-parameter, F-053):
  awareness_record(content="Today I decided to switch from Pinecone to pgvector because...")

Server defaults action="write" and triggers client-side salience-aware
extraction asynchronously. You do NOT need to pass action, scope, or metadata.

RECOMMENDED (one call, richer insights):
  awareness_record(
    content="WHAT: Refactored auth to JWT. WHY: Sessions didn't scale. OUTCOME: Tests pass.",
    insights={
      "knowledge_cards": [{"category": "decision", "title": "JWT for auth",
        "summary": "Switched from session cookies to JWT...", "status": "resolved",
        "tags": ["auth","jwt"], "confidence": 0.9}],
      "action_items": [{"title": "Add refresh token rotation", "priority": "high", "status": "pending"}]
    })

Content auto-detection:
  str             → single event (detailed natural language description)
  list[dict/str]  → batch of events
  str + scope="knowledge" → document/knowledge import

OTHER ACTIONS (explicit — server will NOT infer these):
  update_task — Multi-agent task protocol (all transitions are atomic):
    claim:    awareness_record(action="update_task", task_id=..., status="claimed",
                               expect_status="open", agent_role="builder_agent")
              → {status:"conflict", claimed:false, current_agent_role} if another agent holds it
    renew:    status="doing", expect_status="doing" (claims are leased for 60 minutes)
    hand off: status="open", expect_status="doing",
              handoff={goal, files, decisions, open_questions}
    finish:   status="done" | "blocked" | "failed", expect_status="doing"
    attest:   verified_by="reviewer_agent" (first verifier wins)
    Legacy statuses pending/in_progress/completed are accepted as open/doing/done.

PERCEPTION (auto-returned, review carefully):
  The response may include a "perception" field with signals you didn't ask about:
  - contradiction: your new record conflicts with a prior belief
  - resonance: a similar past experience was found
  - pattern: a recurring theme detected (3+ occurrences)
  - staleness: related knowledge hasn't been updated in 60+ days
  - related_decision: a prior decision in the same domain exists
  These are push signals — the system noticed something important.
  YOU MUST ACT on these signals:
  - contradiction → Tell user about the conflict, ask if intentional
  - resonance → Mention the related experience to the user
  - pattern → Suggest a systematic fix for the recurring issue
  - staleness → Warn user the related knowledge may be outdated
  - related_decision → Mention the prior decision, ask if still valid

Args:
    action: "write" (default) | "update_task".
    content: What happened. String, list of events, or document content.
    insights: Structured insights to create in ONE step. Include knowledge_cards, risks, action_items.
    scope: "timeline" (default) or "knowledge" for document import.
    session_id: From awareness_init (auto-resolved if omitted).
    task_id: Task identifier (for action="update_task").
    status: open | claimed | doing | done | blocked | failed (legacy: pending | in_progress | completed).
    expect_status: CAS guard — the update only lands if the task still holds this status; pass "open" when claiming.
    handoff: Structured hand-off (goal/files/decisions/open_questions) carried by the same atomic transition.
    verified_by: Attestation identity; the first verifier wins, later verifiers get a conflict.

Input Schema

NameRequiredDescriptionDefault
actorNo
scopeNotimeline
actionNowrite
sourceNo
statusNo
api_keyNo
contentNo
handoffNo
task_idNo
user_idNo
insightsNo
metadataNo
memory_idNo
agent_roleNo
event_typeNo
max_eventsNo
session_idNo
verified_byNo
expect_statusNo
generate_summaryNo
metadata_defaultsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / expect_status
      Added value: +{
      +  "default": "",
      +  "title": "Expect Status",
      +  "type": "string"
      +}
    • addedInput schema / properties / handoff
      Added value: +{
      +  "anyOf": [
      +    {
      +      "additionalProperties": true,
      +      "type": "object"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Handoff"
      +}
    • addedInput schema / properties / verified_by
      Added value: +{
      +  "default": "",
      +  "title": "Verified By",
      +  "type": "string"
      +}
  2. First observed

TDQS

A4.2/5.0
Behavior5/5

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

With zero annotations, the description carries the full burden and does so: it discloses the server-side default action="write", asynchronous salience-aware extraction, 60-minute claim leases, CAS conflict return shape ({status:"conflict", claimed:false, current_agent_role}), first-verifier-wins attestation semantics, and the unsolicited 'perception' push-signal field with required agent responses. It also warns that unrecorded actions are lost across sessions, a real persistence consequence.

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 description is long but front-loaded with the single most important instruction (one content string, call after every action) and organized under clear headers with runnable examples. The per-signal 'YOU MUST ACT' playbook is arguably over-specified, but given a 21-parameter unannotated tool, most content earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 21-parameter tool with no annotations and no output schema, the description covers the write path thoroughly and sketches response behavior (conflict objects, perception field). But it leaves the eleven remaining parameters unexplained and never addresses authentication (api_key), multi-tenant scoping (user_id/actor), retention/pagination (max_events), or the response shape for the plain write path.

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 0%, so the description must compensate, and it does well for roughly half the surface: action, content (with type-detection rules for str vs list vs scope="knowledge"), insights shape, scope, session_id, task_id, status (including legacy pending/in_progress/completed aliases), expect_status, handoff, and verified_by. However, 11 of 21 parameters — actor, source, api_key, user_id, metadata, memory_id, agent_role, event_type, max_events, generate_summary, metadata_defaults — are never explained, leaving a substantial semantic gap.

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 opening line states a specific verb and resource — 'Save memory — pass ONE content string, server handles the rest' — which immediately distinguishes it from read-oriented siblings like awareness_timeline, awareness_recall, and awareness_search_knowledge. The description then adds a second mode (action="update_task") for task state transitions, which muddies the single-purpose name somewhat, though the mode split is explicitly labeled.

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?

Explicit 'Call AFTER every meaningful action (code edit, decision, bug fix, discovery)' timing, plus a clear statement that action/scope/metadata should NOT be passed in the primary path. It separates 'OTHER ACTIONS (explicit — server will NOT infer these)' from the default write path and gives per-transition guidance (claim/renew/handoff/finish/attest) with the correct expect_status for each.

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