Skip to main content
Glama

Build brain

build_brain

Compile an agent file into a deterministic, content-addressed brain. content = the file as a string; format = verdigraph_genome | claude_project_export | openai_assistant | prompt_list | auto. Returns brain_id, content_hash, node/edge counts, the 9-invariant firing report, and provenance. Identical bytes always produce the identical brain_id (VB1). include_document=true returns the full graph.

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": {
      "content": "<content>"
    },
    "name": "build_brain"
  }
}

Input Schema

NameRequiredDescriptionDefault
formatNoverdigraph_genome, claude_project_export, openai_assistant, prompt_list or auto (default).auto
contentYesThe agent file, as a string.
request_idNoOptional. Your id for this call. Repeat it to retry safely: the same request_id is never charged twice.
include_documentNoOptional. Include the full compiled document. Default false.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedInput schema / properties / content / description
      Added value: +"The agent file, as a string."
    • addedInput schema / properties / format / description
      Added value: +"verdigraph_genome, claude_project_export, openai_assistant, prompt_list or auto (default)."
    • addedInput schema / properties / include_document / description
      Added value: +"Optional. Include the full compiled document. Default false."
    • addedInput schema / properties / request_id / description
      Added value: +"Optional. Your id for this call. Repeat it to retry safely: the same request_id is never charged twice."
  2. Changed1 schema field changed
    • addedInput schema / properties / request_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Request Id"
      +}
  3. First observed

TDQS

A3.7/5.0
Behavior4/5

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

The annotations say readOnlyHint=false, destructiveHint=false, and idempotentHint=false, and the description adds real context beyond them: the content-addressing guarantee (identical bytes, identical brain_id), the full list of returned artifacts, and the effect of include_document. The statement about identical brain_id concerns output determinism rather than the side effects governed by idempotentHint, so it is consistent with the annotations, though the tension is worth noting. It still does not say that the call is metered or persisted, or what permissions are needed.

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 short, front-loaded, and every clause carries real information such as determinism, return fields, and the include_document toggle. The only mild waste is repeating the format enumeration that the schema already provides.

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 tool that compiles input into a stored artifact, the description covers determinism, the return shape, and the cost of a retry, which is reinforced by request_id in the schema. Since an output schema exists, it does not need to enumerate the fields exhaustively. The remaining gap is the absence of any statement about persistence or billing.

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 description coverage is 100%, so all four parameters are already documented, and the description mostly restates them, for example by listing the formats that format already enumerates. The one point of added meaning is that include_document=true returns the full graph, which is clearer than "include the full compiled document" in the schema. The baseline of 3 fits, because the schema is doing most of the work.

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 uses a specific verb and resource combination, "Compile an agent file into a deterministic, content-addressed brain", and it names the outputs (brain_id, content_hash, node/edge counts, firing report). That is enough to separate this tool from siblings such as verify_brain and describe_agent. It stops short of 5 because it never explicitly names those siblings as alternatives.

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?

Use is implied: give a file, possibly pick a format, and get a brain back. There is no explicit statement about when not to call it, nor any pointer to detect_format for choosing a format or to verify_brain afterwards. The agent must infer routing from the sibling names alone.

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.