Skip to main content
Glama

recall

Search session caches and permanent knowledge graphs with automatic routing to find relevant memory results; use session-aware queries when you need context from the current conversation.

Instructions

Search memory with auto-routing and session awareness.

When session_id is provided without datasets or search_type, searches session cache first by keyword matching. Falls through to the permanent knowledge graph if no session results match.

Auto-routing picks the best search strategy when search_type is not specified.

Input Schema

NameRequiredDescriptionDefault
queryYesNatural language query to search for.
scopeNoComma-separated memory sources to include: 'graph', 'session', 'session_first', 'trace', 'session_context', 'tools', 'code', 'all', 'auto'. Defaults to 'auto' (session first when session_id is set, else graph). 'tools' and 'code' are explicit opt-in only. 'code' runs a deterministic code-graph query and tags results source='code'.
top_kNoMaximum results to return (default: 15).
datasetsNoComma-separated dataset names to search within.
code_queryNo'code' scope only: structured operation and arguments for the deterministic code-graph query, e.g. {"operation": "query_facts", "property": "language", "limit": 500}. Supported operations: query_facts, explore, traverse, find_path, impact_analysis, insights, architecture, delta, capabilities, search, neighbors, subgraph, flows, hubs, ask. When omitted, 'code' scope runs an 'explore' seeded with the query text. Most operations take exact node names/IDs or structured filters; search and ask take natural-language text.
session_idNoSession ID for session-first search.
search_typeNoOverride auto-routing with one SearchType name. Completion types (answer written by an LLM): HYBRID_COMPLETION (the default when routing is off), GRAPH_COMPLETION, GRAPH_COMPLETION_COT, GRAPH_COMPLETION_CONTEXT_EXTENSION, GRAPH_COMPLETION_DECOMPOSITION, GRAPH_SUMMARY_COMPLETION, RAG_COMPLETION, TEMPORAL, BROAD, AGENTIC_COMPLETION. Retrieval-only types (no LLM): CHUNKS, CHUNKS_LEXICAL, SUMMARIES, SKILLS, CODE. Other: CYPHER, NATURAL_LANGUAGE, CODING_RULES, GRAPH_REPORT, FEELING_LUCKY. An unknown name is rejected with a validation error.
system_promptNoOverride the synthesis prompt for completion searches. When omitted, falls back to COGNEE_MCP_RECALL_SYSTEM_PROMPT / _FILE if configured on the server.
include_referencesNoShow the ids `forget` needs to delete one stored item. Use it when asked to forget something specific, then pass a data_id together with its dataset_id to `forget`. - The default answer cites its sources in an `Evidence:` block (each with a data_id, best match first) and ends with a `dataset: <name> (dataset_id=...)` line. - CHUNKS, SUMMARIES, RAG and graph-completion hits instead get `refs: data_id=..., dataset_id=..., document=...` lines, at most 5 per hit, best match first. A chunk hit names the one item its text came from; a graph-completion answer lists every item in its context, so prefer the default type or CHUNKS to find one fact. Session hits are not stored data and get neither. With backend access control off, ids are only shown when recall is scoped to a single dataset.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / include_references
      Added value: +{
      +  "default": false,
      +  "description": "Show the ids `forget` needs to delete one stored item. Use it when\nasked to forget something specific, then pass a data_id together\nwith its dataset_id to `forget`.\n- The default answer cites its sources in an `Evidence:` block (each\n  with a data_id, best match first) and ends with a\n  `dataset: <name> (dataset_id=...)` line.\n- CHUNKS, SUMMARIES, RAG and graph-completion hits instead get\n  `refs: data_id=..., dataset_id=..., document=...` lines, at most 5\n  per hit, best match first. A chunk hit names the one item its text\n  came from; a graph-completion answer lists every item in its\n  context, so prefer the default type or CHUNKS to find one fact.\nSession hits are not stored data and get neither. With backend\naccess control off, ids are only shown when recall is scoped to a\nsingle dataset.",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / search_type / description
      Previous value: -"Override auto-routing with one SearchType name. Completion types\n(answer written by an LLM): HYBRID_COMPLETION (the default when\nrouting is off), GRAPH_COMPLETION, GRAPH_COMPLETION_COT,\nGRAPH_COMPLETION_CONTEXT_EXTENSION, GRAPH_COMPLETION_DECOMPOSITION,\nGRAPH_SUMMARY_COMPLETION, RAG_COMPLETION, TEMPORAL,\nAGENTIC_COMPLETION. Retrieval-only types (no LLM):\nCHUNKS, CHUNKS_LEXICAL, SUMMARIES, SKILLS, CODE. Other: CYPHER,\nNATURAL_LANGUAGE, CODING_RULES, GRAPH_REPORT, FEELING_LUCKY.\nAn unknown name is rejected with a validation error."New value: +"Override auto-routing with one SearchType name. Completion types\n(answer written by an LLM): HYBRID_COMPLETION (the default when\nrouting is off), GRAPH_COMPLETION, GRAPH_COMPLETION_COT,\nGRAPH_COMPLETION_CONTEXT_EXTENSION, GRAPH_COMPLETION_DECOMPOSITION,\nGRAPH_SUMMARY_COMPLETION, RAG_COMPLETION, TEMPORAL, BROAD,\nAGENTIC_COMPLETION. Retrieval-only types (no LLM):\nCHUNKS, CHUNKS_LEXICAL, SUMMARIES, SKILLS, CODE. Other: CYPHER,\nNATURAL_LANGUAGE, CODING_RULES, GRAPH_REPORT, FEELING_LUCKY.\nAn unknown name is rejected with a validation error."
  2. Changed2 schema fields changedv1.6.5
    • changedInput schema / properties / code_query / description
      Previous value: -"'code' scope only: structured operation and arguments for the\ndeterministic code-graph query, e.g. {\"operation\": \"query_facts\",\n\"property\": \"language\", \"limit\": 500}. Supported operations:\nquery_facts, explore, traverse, find_path, impact_analysis, insights,\narchitecture, delta. When omitted, 'code' scope runs an 'explore'\nseeded with the query text. Requires exact node names/IDs or\nstructured filters, not natural-language questions."New value: +"'code' scope only: structured operation and arguments for the\ndeterministic code-graph query, e.g. {\"operation\": \"query_facts\",\n\"property\": \"language\", \"limit\": 500}. Supported operations:\nquery_facts, explore, traverse, find_path, impact_analysis, insights,\narchitecture, delta, capabilities, search, neighbors, subgraph, flows,\nhubs, ask. When omitted, 'code' scope runs an 'explore' seeded with the\nquery text. Most operations take exact node names/IDs or structured\nfilters; search and ask take natural-language text."
    • changedInput schema / properties / search_type / description
      Previous value: -"Override auto-routing with one SearchType name. Completion types\n(answer written by an LLM): HYBRID_COMPLETION (the default when\nrouting is off), GRAPH_COMPLETION, GRAPH_COMPLETION_COT,\nGRAPH_COMPLETION_CONTEXT_EXTENSION, GRAPH_COMPLETION_DECOMPOSITION,\nGRAPH_SUMMARY_COMPLETION, RAG_COMPLETION, TRIPLET_COMPLETION,\nTEMPORAL, AGENTIC_COMPLETION. Retrieval-only types (no LLM):\nCHUNKS, CHUNKS_LEXICAL, SUMMARIES, SKILLS, CODE. Other: CYPHER,\nNATURAL_LANGUAGE, CODING_RULES, GRAPH_REPORT, FEELING_LUCKY.\nAn unknown name is rejected with a validation error."New value: +"Override auto-routing with one SearchType name. Completion types\n(answer written by an LLM): HYBRID_COMPLETION (the default when\nrouting is off), GRAPH_COMPLETION, GRAPH_COMPLETION_COT,\nGRAPH_COMPLETION_CONTEXT_EXTENSION, GRAPH_COMPLETION_DECOMPOSITION,\nGRAPH_SUMMARY_COMPLETION, RAG_COMPLETION, TEMPORAL,\nAGENTIC_COMPLETION. Retrieval-only types (no LLM):\nCHUNKS, CHUNKS_LEXICAL, SUMMARIES, SKILLS, CODE. Other: CYPHER,\nNATURAL_LANGUAGE, CODING_RULES, GRAPH_REPORT, FEELING_LUCKY.\nAn unknown name is rejected with a validation error."
  3. Changed2 schema fields changedv1.6.4
    • addedInput schema / properties / code_query
      Added value: +{
      +  "anyOf": [
      +    {
      +      "additionalProperties": true,
      +      "type": "object"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "'code' scope only: structured operation and arguments for the\ndeterministic code-graph query, e.g. {\"operation\": \"query_facts\",\n\"property\": \"language\", \"limit\": 500}. Supported operations:\nquery_facts, explore, traverse, find_path, impact_analysis, insights,\narchitecture, delta. When omitted, 'code' scope runs an 'explore'\nseeded with the query text. Requires exact node names/IDs or\nstructured filters, not natural-language questions."
      +}
    • addedInput schema / properties / scope
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Comma-separated memory sources to include: 'graph', 'session',\n'session_first', 'trace', 'session_context', 'tools', 'code', 'all',\n'auto'. Defaults to 'auto' (session first when session_id is set,\nelse graph). 'tools' and 'code' are explicit opt-in only. 'code' runs\na deterministic code-graph query and tags results source='code'."
      +}
  4. Changed10 schema fields changedv1.6.0
    • addedInput schema / properties / datasets / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedInput schema / properties / datasets / type
      Removed value: -"string"
    • addedInput schema / properties / search_type / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / search_type / description
      Previous value: -"Override auto-routing. Options: GRAPH_COMPLETION,\nGRAPH_COMPLETION_COT, RAG_COMPLETION, CHUNKS, SUMMARIES,\nTEMPORAL, FEELING_LUCKY, etc."New value: +"Override auto-routing with one SearchType name. Completion types\n(answer written by an LLM): HYBRID_COMPLETION (the default when\nrouting is off), GRAPH_COMPLETION, GRAPH_COMPLETION_COT,\nGRAPH_COMPLETION_CONTEXT_EXTENSION, GRAPH_COMPLETION_DECOMPOSITION,\nGRAPH_SUMMARY_COMPLETION, RAG_COMPLETION, TRIPLET_COMPLETION,\nTEMPORAL, AGENTIC_COMPLETION. Retrieval-only types (no LLM):\nCHUNKS, CHUNKS_LEXICAL, SUMMARIES, SKILLS, CODE. Other: CYPHER,\nNATURAL_LANGUAGE, CODING_RULES, GRAPH_REPORT, FEELING_LUCKY.\nAn unknown name is rejected with a validation error."
    • removedInput schema / properties / search_type / type
      Removed value: -"string"
    • addedInput schema / properties / session_id / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedInput schema / properties / session_id / type
      Removed value: -"string"
    • addedInput schema / properties / system_prompt / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedInput schema / properties / system_prompt / type
      Removed value: -"string"
    • changedInput schema / properties / top_k / description
      Previous value: -"Maximum results to return (default: 10)."New value: +"Maximum results to return (default: 15)."
  5. Changed15 schema fields changedv1.5.0
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / datasets / description
      Added value: +"Comma-separated dataset names to search within."
    • removedInput schema / properties / datasets / title
      Removed value: -"Datasets"
    • addedInput schema / properties / query / description
      Added value: +"Natural language query to search for."
    • removedInput schema / properties / query / title
      Removed value: -"Query"
    • addedInput schema / properties / search_type / description
      Added value: +"Override auto-routing. Options: GRAPH_COMPLETION,\nGRAPH_COMPLETION_COT, RAG_COMPLETION, CHUNKS, SUMMARIES,\nTEMPORAL, FEELING_LUCKY, etc."
    • removedInput schema / properties / search_type / title
      Removed value: -"Search Type"
    • addedInput schema / properties / session_id / description
      Added value: +"Session ID for session-first search."
    • removedInput schema / properties / session_id / title
      Removed value: -"Session Id"
    • addedInput schema / properties / system_prompt / description
      Added value: +"Override the synthesis prompt for completion searches. When omitted,\nfalls back to COGNEE_MCP_RECALL_SYSTEM_PROMPT / _FILE if configured\non the server."
    • removedInput schema / properties / system_prompt / title
      Removed value: -"System Prompt"
    • addedInput schema / properties / top_k / description
      Added value: +"Maximum results to return (default: 10)."
    • removedInput schema / properties / top_k / title
      Removed value: -"Top K"
    • removedInput schema / title
      Removed value: -"recallArguments"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "result": {
      +      "items": {},
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "result"
      +  ],
      +  "type": "object",
      +  "x-fastmcp-wrap-result": true
      +}
  6. Addedv1.4.1
  7. Removedv1.4.0
  8. Changed1 schema field changedv1.0.2
    • changedInput schema / properties / top_k / default
      Previous value: -10New value: +15
  9. First observedv1.0.1

TDQS

A3.7/5.0
Behavior3/5

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

No annotations exist, so the description carries the full disclosure burden. It does disclose real behavior beyond the schema: session-cache-first with keyword matching, fallback to the permanent graph, and auto-routing when search_type is omitted. It says nothing about cost/latency of LLM-backed completion searches, permission or access-control requirements, or result ordering, which are exactly the gaps a no-annotation tool needs covered.

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?

Front-loaded with the purpose, then two short paragraphs of conditional behavior; no filler. The session paragraph is slightly redundant with the auto-routing paragraph, but both earn their space by covering distinct inputs.

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

Completeness5/5

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

With nine parameters but 100% schema coverage and an output schema, the description only needs to supply the routing logic, which it does completely. An agent can pick inputs and predict which source is searched without reading further.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3; the description earns an increment by synthesizing the interaction between session_id, datasets and search_type into a single precedence rule that no individual parameter description states. It adds no further detail for top_k, scope or code_query beyond what the schema already documents in depth.

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?

States a specific verb and resource ("Search memory") plus two distinguishing modifiers (auto-routing, session awareness), so the agent knows this is the memory-retrieval entry point. It never names the siblings it differs from (code_search, search_tools, forget), so differentiation is left to inference.

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 description explains conditional routing ("When session_id is provided without datasets or search_type... Falls through to the permanent knowledge graph"), which implicitly tells the agent how inputs change behavior. It gives no explicit when-to-use-this-vs-alternative guidance against forget, remember, code_search or search_tools; the cross-tool workflow hint ("pass a data_id together with its dataset_id to `forget`") lives only in the include_references parameter description.

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

Deploy Server

Other Tools