Skip to main content
Glama

pg_memory

Save and query cross-slot repository engineering rules and known pitfalls so coding agents reuse hard-won guidance instead of repeating past mistakes.

Instructions

Persist or recall cross-slot repository engineering rules & pitfalls (stored in knowledge.db + .agents/rules).

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": {
      "op": "<op>"
    },
    "name": "pg_memory"
  }
}

Input Schema

NameRequiredDescriptionDefault
opYes'remember' saves a rule; 'recall' queries matching rules.
slotNoWorkspace slot name (optional if only one slot is open or `--slot` default is set).
queryNoSearch query when op='recall'.
titleNoShort rule title when op='remember'.
key_idNoStable identifier when op='remember'.
rule_textNoEngineering rule/pitfall details when op='remember'.
file_globsNoComma-separated file globs (e.g. 'src/auth/*.py', default '*').

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv4.7.1

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It usefully discloses that rules are stored in knowledge.db and .agents/rules and that the tool persists or recalls across slots, but it does not describe mutation side effects, permissions, conflict handling, or what recall returns.

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?

The definition is a single front-loaded sentence with no wasted language. It efficiently states the core operations, scope, and storage mechanism.

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 seven-parameter tool with no annotations and no output schema, the description omits important context such as recall result format and remember side effects. The full schema mitigates this for parameters, but the description alone is only minimally 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 all seven parameters including op, slot, query, and rule fields are already documented in the schema. The description adds storage and cross-slot context but does not add parameter-specific meaning beyond that baseline.

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 states a specific pair of verbs (persist/recall) and a specific resource (cross-slot repository engineering rules & pitfalls), plus the storage locations. This clearly distinguishes pg_memory from the surrounding slot, review, and diagnostic tools.

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

Usage Guidelines2/5

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

The description explains what the tool does but gives no explicit guidance on when to use remember versus recall, when not to use it, or what alternatives exist. The operation split is only implied by the tool's purpose and documented in the schema, not in the description.

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