Skip to main content
Glama

Note schemas

bm_schema
Read-onlyIdempotent

Validate notes against Picoschema schemas, infer schemas from a note type, or diff notes to detect drift, keeping Basic Memory note structures consistent.

Instructions

Basic Memory note schemas (Picoschema). command: validate notes against their schema (one note_type, one note by identifier, or every type that has a schema); infer a schema from the notes of a note_type; diff a note_type's notes against its schema to find drift. A schema is a note with type: schema whose entity field names the note type it describes.

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": {
      "command": "<command>",
      "project": "<project>"
    },
    "name": "bm_schema"
  }
}

Input Schema

NameRequiredDescriptionDefault
commandYesWhat to do.
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.
note_typeNoThe frontmatter `type:` to check. Required for infer and diff.
thresholdNoFor infer: the share of notes a field must appear in to be suggested.
identifierNoFor validate: one note, instead of a whole note type.
output_formatNotext

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 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: -[
      -  "command"
      -]New value: +[
      +  "command",
      +  "project"
      +]
  2. Addedv0.24.1

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, non-destructive and closed-world, so the safety profile is covered. The description adds genuine domain context beyond that: the definition of a schema note and the entity field linkage. It doesn't describe failure output or how partial validation results are reported, but an output schema exists to carry that.

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 core capability and the three commands are front-loaded in the first sentence, with the schema definition last. It is dense but every clause carries information; the telegraphic 'infer a schema from the notes of a note_type' phrasing costs a little readability.

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?

For a three-mode tool with a full output schema and rich annotations, the description covers what the commands do and the conceptual model needed to use them. Remaining gaps (threshold behavior, output_format choice) are handled by the schema, so nothing essential is missing.

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 83%, so the baseline is 3, and the description earns a bump by clarifying the mutually exclusive targeting modes (one note_type, one note via identifier, or every type with a schema) that the schema only hints at with per-field 'For validate' notes. The threshold and output_format parameters are not mentioned in the description, but both are documented in the 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 names the resource (Basic Memory note schemas / Picoschema) and gives a specific verb for each of the three commands: validate, infer, and diff. It also defines what a schema is (a note with type: schema whose entity field names the described type). It does not explicitly distinguish itself from siblings such as bm_man or bm_read, relying on the uniqueness of schema operations instead.

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?

Each command is given a situation: validate for one note_type, one note by identifier, or all types with schemas; infer to derive a schema from existing notes; diff to find drift. That is clear per-command guidance. There are no explicit exclusions or pointers to alternative tools for overlapping needs.

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