Skip to main content
Glama

memory_explain

Read-only

Explains search results with a detailed scoring breakdown to reveal why specific memories were matched.

Instructions

Explain search results with detailed scoring breakdown.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idsNoSpecific memory IDs to explain
kindNoFilter by memory kind
limitNoMax results
queryNoSearch query
projectNoFilter by project scope (matches sessions.project)
scope_idNoFilter by a single sharing domain scope_id
trust_biasNo
visibilityNo
personal_firstNo
ownership_scopeNo
exclude_actor_idsNo
exclude_scope_idsNoSharing domain scope_ids to exclude
include_actor_idsNo
include_scope_idsNoSharing domain scope_ids to include
exclude_visibilityNo
include_visibilityNo
exclude_trust_statesNo
include_pack_contextNoInclude formatted pack context
include_trust_statesNo
exclude_workspace_idsNo
include_workspace_idsNo
widen_shared_when_weakNo
exclude_workspace_kindsNo
include_workspace_kindsNo
widen_shared_min_personal_scoreNo
widen_shared_min_personal_resultsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemsYes
errorsYes
metadataYes
missing_idsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.44.2
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "errors": {
      +      "items": {
      +        "additionalProperties": {},
      +        "properties": {
      +          "code": {
      +            "type": "string"
      +          },
      +          "field": {
      +            "type": "string"
      +          },
      +          "ids": {
      +            "items": {
      +              "type": [
      +                "string",
      +                "number"
      +              ]
      +            },
      +            "type": "array"
      +          },
      +          "message": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "code",
      +          "field",
      +          "message"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "items": {
      +      "items": {
      +        "additionalProperties": {},
      +        "properties": {
      +          "created_at": {
      +            "type": "string"
      +          },
      +          "id": {
      +            "maximum": 9007199254740991,
      +            "minimum": -9007199254740991,
      +            "type": "integer"
      +          },
      +          "kind": {
      +            "type": "string"
      +          },
      +          "matches": {
      +            "additionalProperties": {},
      +            "properties": {
      +              "project_match": {
      +                "type": [
      +                  "boolean",
      +                  "null"
      +                ]
      +              },
      +              "query_terms": {
      +                "items": {
      +                  "type": "string"
      +                },
      +                "type": "array"
      +              }
      +            },
      +            "required": [
      +              "query_terms",
      +              "project_match"
      +            ],
      +            "type": "object"
      +          },
      +          "pack_context": {
      +            "anyOf": [
      +              {
      +                "additionalProperties": {},
      +                "properties": {
      +                  "included": {
      +                    "type": [
      +                      "boolean",
      +                      "null"
      +                    ]
      +                  },
      +                  "section": {
      +                    "type": [
      +                      "string",
      +                      "null"
      +                    ]
      +                  }
      +                },
      +                "required": [
      +                  "included",
      +                  "section"
      +                ],
      +                "type": "object"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "project": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "retrieval": {
      +            "additionalProperties": {},
      +            "properties": {
      +              "rank": {
      +                "anyOf": [
      +                  {
      +                    "maximum": 9007199254740991,
      +                    "minimum": -9007199254740991,
      +                    "type": "integer"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ]
      +              },
      +              "source": {
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "source",
      +              "rank"
      +            ],
      +            "type": "object"
      +          },
      +          "role": {
      +            "additionalProperties": {},
      +            "properties": {
      +              "inferred": {
      +                "type": "string"
      +              },
      +              "reason": {
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "inferred",
      +              "reason"
      +            ],
      +            "type": "object"
      +          },
      +          "score": {
      +            "additionalProperties": {},
      +            "properties": {
      +              "components": {
      +                "additionalProperties": {},
      +                "properties": {
      +                  "base": {
      +                    "type": [
      +                      "number",
      +                      "null"
      +                    ]
      +                  },
      +                  "kind_bonus": {
      +                    "type": "number"
      +                  },
      +                  "personal_bias": {
      +                    "type": "number"
      +                  },
      +                  "recency": {
      +                    "type": "number"
      +                  },
      +                  "semantic_boost": {
      +                    "type": [
      +                      "number",
      +                      "null"
      +                    ]
      +                  }
      +                },
      +                "required": [
      +                  "base",
      +                  "recency",
      +                  "kind_bonus",
      +                  "personal_bias",
      +                  "semantic_boost"
      +                ],
      +                "type": "object"
      +              },
      +              "total": {
      +                "type": [
      +                  "number",
      +                  "null"
      +                ]
      +              }
      +            },
      +            "required": [
      +              "total",
      +              "components"
      +            ],
      +            "type": "object"
      +          },
      +          "title": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "id",
      +          "kind",
      +          "title",
      +          "created_at",
      +          "project",
      +          "retrieval",
      +          "score",
      +          "role",
      +          "matches",
      +          "pack_context"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "metadata": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "include_pack_context": {
      +          "type": "boolean"
      +        },
      +        "project": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "query": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "requested_ids_count": {
      +          "maximum": 9007199254740991,
      +          "minimum": -9007199254740991,
      +          "type": "integer"
      +        },
      +        "returned_items_count": {
      +          "maximum": 9007199254740991,
      +          "minimum": -9007199254740991,
      +          "type": "integer"
      +        },
      +        "sanitized_query": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "query",
      +        "project",
      +        "requested_ids_count",
      +        "returned_items_count",
      +        "include_pack_context"
      +      ],
      +      "type": "object"
      +    },
      +    "missing_ids": {
      +      "items": {
      +        "maximum": 9007199254740991,
      +        "minimum": -9007199254740991,
      +        "type": "integer"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "items",
      +    "missing_ids",
      +    "errors",
      +    "metadata"
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

B3.1/5.0
Behavior3/5

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

The annotations already establish readOnlyHint=true and openWorldHint=false, so the description does not need to re-assert safety. It adds the 'detailed scoring breakdown' behavior, which is useful context, but it does not disclose how results are selected or whether a prior search is required.

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 a single efficient sentence with no filler and the core idea is front-loaded. It is concise, though for a tool with 26 parameters it could afford a second clause to clarify usage without becoming verbose.

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

Completeness2/5

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

Given the high parameter count, low schema coverage, and many sibling tools, a one-sentence description is insufficient. It does not explain how to supply 'search results' (via ids vs query vs filters), how parameters combine, or how the scoring breakdown is structured, leaving too much to guesswork.

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 description coverage is only 35% across 26 parameters, and the description names none of them. The agent gets no help understanding how 'ids', 'query', 'kind', or the many filter parameters behave, so the description does not compensate for the poorly documented schema.

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 and resource: it explains search results and provides a detailed scoring breakdown. This distinguishes it from memory_search, which would return the results themselves, though it does not explicitly name any sibling or contrast with them.

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 'Explain search results' implies this tool is for post-search analysis rather than for finding memories, but there is no explicit guidance about when to use it versus memory_search, memory_get, or memory_expand. The intended workflow is left to inference.

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