Skip to main content
Glama

Build context

bm_context
Read-onlyIdempotent

Follow a note’s knowledge graph up to five relation hops, filtering recent changes and optionally omitting note bodies to map connected notes before reading selected ones.

Instructions

Follow the Basic Memory knowledge graph from a note: the note, its observations, and the notes its relations reach, up to depth hops (1-5). identifier is a path, permalink, memory:// URL, or a pattern such as 'specs/*'. since limits related results to recent changes. compact returns the graph without note bodies; read chosen notes with bm_read.

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": {
      "identifier": "<identifier>",
      "project": "<project>"
    },
    "name": "bm_context"
  }
}

Input Schema

NameRequiredDescriptionDefault
pageNoPage number.
depthNoRelation hops to follow (1-5).
sinceNoHow far back to look: '7d', '24h', '2 days ago', 'last week', or a date. Windows shorter than one day are widened to one day.7d
compactNoOmit note bodies and observations; keep the graph shape.
projectYesRequired project name, 'workspace/project', or project external id. Discover projects with bm_project(command='list'). Paths are relative to this project; a qualified path must agree with it.
page_sizeNoPrimary results per page (1-50).
identifierYesWhere to start: a note path, permalink, memory:// URL, or a pattern such as 'specs/*'.
max_relatedNoMost related results to return (0-100).
output_formatNojson

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changed
    • removedInput schema / properties / project / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / project / default
      Removed value: -null
    • changedInput schema / properties / project / description
      Previous value: -"Project name, 'workspace/project', or project external id. Omit to use the default project."New value: +"Required project name, 'workspace/project', or project external id. Discover projects with bm_project(command='list'). Paths are relative to this project; a qualified path must agree with it."
    • addedInput schema / properties / project / minLength
      Added value: +1
    • addedInput schema / properties / project / type
      Added value: +"string"
    • changedInput schema / required
      Previous value: -[
      -  "identifier"
      -]New value: +[
      +  "identifier",
      +  "project"
      +]
    • changedOutput schema / properties / result / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": true,
      -    "type": "object"
      -  },
      -  {
      -    "type": "string"
      -  }
      -]New value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "additionalProperties": true,
      +    "type": "object"
      +  }
      +]
  2. Addedv0.24.1

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world, so the safety bar is met structurally. The description adds real behavioral context beyond them: hop limits of 1-5, that `since` scopes only related results, and that `compact` strips bodies while keeping graph shape.

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?

Three dense sentences, front-loaded with the core traversal behavior and ending with the handoff to bm_read. No filler and no restatement of the title.

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?

With an output schema present, return values need no explanation, and the description covers the traversal model and the key tuning knobs. It omits mention of the required `project` scoping and pagination (`page`/`page_size`/`max_related`), though the schema carries those adequately.

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 coverage is 89%, so the schema already documents nearly every parameter, and the description largely restates it (`identifier` forms, `depth` 1-5, `compact` omitting bodies). The one genuine addition is clarifying that `since` limits related results specifically rather than the root note, which is why this sits at baseline rather than below it.

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 and resource: follow the knowledge graph from a note, returning the note, its observations, and relation-reached notes up to `depth` hops. It also names the boundary against the sibling bm_read, so an agent can distinguish traversal from direct reading without opening either schema.

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

Usage Guidelines4/5

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

The closing clause routes the agent clearly: use `compact` for graph shape, then bm_read for chosen note bodies. That is a genuine when-to-use/alternative statement. It does not, however, say when to prefer this over bm_search or bm_find for discovery.

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