Skip to main content
Glama

build_context

Assembles a ready-to-use project context block from a brief, key memories, optional query matches, and related memories for session start.

Instructions

One ready-to-use context block for a project: auto-maintained project brief + key memories + optional query matches + 1-hop relations, capped to maxChars. Ideal first call at session start.

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

Input Schema

NameRequiredDescriptionDefault
queryNoOptional focus — matching memories are added to the block
projectYesProject path or name
maxCharsNoUpper bound on the block size in characters

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.16.1
    • addedInput schema / properties / maxChars / description
      Added value: +"Upper bound on the block size in characters"
    • changedInput schema / properties / project / description
      Previous value: -"Path atau nama proyek"New value: +"Project path or name"
    • changedInput schema / properties / query / description
      Previous value: -"Fokus opsional — memori yang cocok ditambahkan ke blok"New value: +"Optional focus — matching memories are added to the block"
  2. First observed

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose the aggregation behavior (memories + relations folded into one block) and the size cap via maxChars, which are real behavioral traits. It stops short of stating that the call is read-only/no-side-effect or what happens when the project is unknown or empty.

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?

Two dense sentences, front-loaded with the return payload, then the usage cue. Every clause adds information; nothing is redundant.

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-parameter read tool with no output schema and no annotations, the description explains what the returned block contains and how it is bounded, which is enough to invoke it correctly. Only the return serialization (plain text vs structured) and missing-project behavior are left unstated.

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 100%, so all three parameters are already documented. The description restates the query-focus and maxChars-cap semantics rather than adding new meaning such as path format expectations or how matches are ranked within the cap.

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 states a concrete resource and enumerates its composition (project brief, key memories, query matches, 1-hop relations) plus the maxChars cap, so an agent knows exactly what it gets back. It does not name or contrast any sibling such as project_context or recall, leaving differentiation implicit.

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?

"Ideal first call at session start" gives a clear selection cue for this tool over memory lookups. It offers no explicit when-not guidance or named alternative for cases where a targeted memory fetch would be better.

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