Skip to main content
Glama

read_vault_context

Read a vault node to decide what to inspect next: returns full content for small notes or an outline with chunk descriptors for larger notes, so you can page targeted sections.

Instructions

Read a node in full if small, otherwise return its overview and chunks.

Check "mode" first: the two shapes differ. mode="full" — the whole note in "content". The outline fields below are absent, not null. mode="outline" — title, summary, size_chars, estimated_tokens, max_tokens, outline_hash, chunks_total, chunk_offset, next_chunk_offset, and "chunks": a page of descriptors (id, heading_path, part, parts, estimated_tokens, excerpt). Choose chunks from the excerpts and heading paths; "content" is absent.

Read a chunk with read_vault_chunk, passing outline_hash and the SAME max_tokens — the hash covers the budget, so a different one is refused rather than answered with a different section. Use the same max_tokens when paging, too.

Paging: chunks_total counts every chunk; next_chunk_offset (null on the last page) is the chunk_offset for the rest. An offset past the last chunk is an error, not an empty page.

max_tokens bounds THIS response (chars/4, not a model tokenizer), not the whole walk: each chunk you then read costs up to that much again. A small budget cannot be honoured exactly — an outline always describes a usable page, so it may reach ~2000 characters however small max_tokens is.

Errors arrive as {"error": "..."}, not as an exception. Accepts a UID, absolute path, or vault-relative path.

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": {
      "path": "<path>"
    },
    "name": "read_vault_context"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes
commitNo
max_tokensNo
chunk_offsetNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.9.2

TDQS

A4.5/5.0
Behavior5/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 so unusually well: it discloses absent-vs-null fields per mode, that errors arrive as {"error": ...} rather than exceptions, that an offset past the last chunk is an error and not an empty page, that max_tokens is chars/4 and bounds only this response, and that the hash covers the budget so a changed max_tokens is refused.

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?

It is front-loaded with the core contract, then segmented into mode shapes, chunk reading, paging, budget, and errors — each section carrying non-redundant information despite the length. The instruction "Check \"mode\" first" is a structural weak point, since mode is not in the input schema and the reader must infer it is a response field.

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 no annotations, no output schema, and 0% schema description coverage, the description must define both inputs and return shape, and it enumerates the outline fields and explains paging and error semantics thoroughly. The unexplained commit parameter and the ambiguous "mode" reference are the remaining completeness gaps.

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 0%, so the description must supply meaning, and it does for three of four parameters: path accepts a UID, absolute path, or vault-relative path; max_tokens is defined by scope and rough unit (chars/4, with a ~2000-char floor); chunk_offset is defined through the paging explanation. The commit parameter is never mentioned, leaving one gap.

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?

Opens with a specific verb+resource+conditional behavior: "Read a node in full if small, otherwise return its overview and chunks." It then names read_vault_chunk as the follow-up tool and enumerates the two response shapes, so an agent can distinguish this from plain read_vault or read_vault_chunk without opening a 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?

It gives concrete workflow guidance — read a chunk with read_vault_chunk, pass outline_hash and the SAME max_tokens, and reuse that max_tokens when paging — which is exactly the kind of conditional routing an agent needs. It stops short of saying when to prefer this tool over read_vault for a whole-node read, so the exclusion set is incomplete.

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