Skip to main content
Glama

Update Brain

update_brain

Add a new note to a brain; the server resolves storage from the brain record (BlackOps for DB-backed brains, a GitHub commit for vault-backed ones). Use this whenever the user says "update the brain", "add this to the brain", or "log this in the brain". Call list_brains first for the brain_id if you do not have it; create_brain makes a new brain. A DB-backed brain recompiles immediately; a vault-backed one on its next compile. Use post_notes_write (with brain_id) only for control over the filename or path. A brain's sanitize rules may hold a write: follow details.sanitize_hold.

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": {
      "brain_id": "<brain_id>",
      "markdown_content": "<markdown_content>"
    },
    "name": "update_brain"
  }
}

Input Schema

NameRequiredDescriptionDefault
agentNoYour name, on every write: Duet/<channel name> or Grok Bot/<bot name>.
brain_idYesBrain UUID (from list_brains)
allow_secretsNo
note_filenameNoFilename without .md. Defaults from section_title or the date.
section_titleNoTitle for this note — used as the filename slug (e.g. "Threads Integration")
commit_messageNoGit commit message.
sanitize_answerNo
markdown_contentYesMarkdown content for the new note to add to the brain

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the load and does well: it discloses backend-dependent storage (BlackOps vs a GitHub commit), the differing recompile timing (immediate for DB-backed, next compile for vault-backed), and a real failure mode — sanitize rules can hold the write, in which case follow details.sanitize_hold. It does not cover permissions/auth expectations or what happens to concurrent or duplicate writes, which would round out behavioral disclosure.

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 core action and the storage-resolution fact, then usage triggers, then prerequisites and alternatives — a logical progression with no filler sentences. The BlackOps/GitHub parenthetical is slightly implementation-detailed, but it earns its place by explaining why behavior differs between brains.

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 an 8-parameter mutation tool with no annotations and no output schema, the definition covers action, triggers, prerequisites, alternatives, backend-dependent effects, and the sanitize-hold branch (even referencing details.sanitize_hold as the return indicator). The remaining gap is unglossed parameters (allow_secrets, sanitize_answer), which the description leaves entirely to the schema.

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 75%, so the schema already documents the key fields (brain_id, note_filename defaulting from section_title or date, agent format, commit_message). The description adds only an indirect pointer — the sanitize_hold mention implies sanitize_answer is the retry path — and says nothing about allow_secrets or the nested sanitize_answer object, so it only marginally exceeds the 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?

"Add a new note to a brain" gives a specific verb and resource, and the definition immediately clarifies that storage backend selection is server-side (DB-backed vs vault-backed). It also names the contrasting sibling (post_notes_write) and the prerequisite sibling (list_brains), so an agent can place it precisely without opening the schema.

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

Usage Guidelines5/5

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

Explicit trigger phrases ("update the brain", "add this to the brain", "log this in the brain") and explicit prerequisites ("Call list_brains first for the brain_id"). It also states the exclusion condition for going elsewhere: use post_notes_write only when you need filename or path control, and create_brain for a new brain.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.