Skip to main content
Glama

guardAgentMemory

Read-only

Scans RAG context chunks, vector DB retrievals, and persistent agent memory payloads for delayed sleeper-agent instructions and cross-session poisoning. Price: 0.02 USDC on Base or Solana.

Input Schema

NameRequiredDescriptionDefault
session_idNodefault
memory_chunkYesMemory or RAG chunk to verify before persistence

Output Schema

NameRequiredDescriptionDefault
verdictNo
risk_scoreYes
safe_to_persistYes
sleeper_trigger_detectedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "risk_score": {
      +      "type": "integer"
      +    },
      +    "safe_to_persist": {
      +      "type": "boolean"
      +    },
      +    "sleeper_trigger_detected": {
      +      "type": "boolean"
      +    },
      +    "verdict": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "safe_to_persist",
      +    "sleeper_trigger_detected",
      +    "risk_score"
      +  ],
      +  "type": "object"
      +}
  2. Added

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, which matches the 'scans' framing, so no contradiction. The description adds genuinely non-obvious behavioral context: the tool is paid, costing 0.02 USDC on Base or Solana, which an agent must know before calling. It doesn't say what happens on a positive detection or whether scanning is rate-limited.

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 sentences, threat scope front-loaded, pricing second. No filler and no restatement of the tool name.

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?

An output schema exists so return values need not be described, and the payment model plus detection scope are covered. The remaining gap is session_id semantics and what the agent should do on a flagged result, which keeps it short of complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is only 50%, and the uncovered parameter is session_id (default 'default'), which the description never explains at all — its role in cross-session poisoning detection is exactly the kind of semantics an agent needs. The description adds nothing beyond what the memory_chunk schema description already says.

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?

States a specific verb (scans) and a specific set of resources (RAG chunks, vector DB retrievals, persistent agent memory), plus the exact threat class (delayed sleeper-agent instructions, cross-session poisoning). This clearly separates it from sibling auditMcpToolPoisoning, which targets tool definitions rather than memory payloads.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The phrase 'verify before persistence' on the memory_chunk parameter implies the invocation point, but the main description never says when to call this versus auditMcpToolPoisoning or canary_sanitize, and gives no exclusions or prerequisites. Usage has to be inferred.

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.