Skip to main content
Glama
bezata

kObsidian MCP

by bezata

Read Fenced Block

blocks.read
Read-onlyIdempotent

Read a fenced block's source and language-specific metadata from an Obsidian note. Locate by stable blockId or index within a language group; returns Mermaid directives or Dataview DQL metadata.

Instructions

Read one fenced block's source and language-specific metadata. Locate the block by blockId (preferred, stable) or index (0-based within the language group in the file; defaults to 0). language is required so the tool can dispatch to the correct parser and return the right metadata (Mermaid directives, Dataview DQL parts, etc.). Fails with not_found when no block matches the locator. Read-only.

Operates on the session-active vault (see vault.current — selectable via vault.select) unless an explicit vaultPath argument is passed, which always wins.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexNo0-based position of the block within its language group in the file. Use when no blockId is available. Defaults to 0 (the first block).
blockIdNoStable block identifier (e.g. `^abc123`). Takes precedence over `index` when both are given.
filePathYesPath of the note containing the block.
languageYesLanguage of the block to read (required so `blocks.read` can dispatch to the correct parser).
vaultPathNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNo
sourceYesThe block's body source (without fences).
filePathYes
languageYesFenced-code-block language. `dataview` = raw DQL query block; `dataviewjs` = inline JavaScript block; `mermaid` = diagram block.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Addedv0.3.5
  2. Removedv0.3.4
  3. Addedv0.1.2

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the readOnly and idempotent annotations, the description discloses key behaviors: blockId takes precedence over index, index defaults to 0 within the language group, failure returns not_found, and vault resolution prefers vaultPath over the session-active vault. This is substantial behavioral context that cannot be inferred from annotations alone.

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?

The description is front-loaded with the core action and then adds only high-value details: locator rules, language requirement, failure behavior, and vault scoping. Every sentence contributes operational guidance, and the examples for metadata (Mermaid directives, Dataview DQL parts) clarify the abstraction.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given an output schema exists and annotations cover safety, the description needs only to explain selection, error behavior, and vault scoping — all of which it does. Nothing required for a correct call is missing; the parameter semantics, failure mode, and vault override are all explicit.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Although schema coverage is already 80%, the description adds meaningful semantics: blockId is 'stable' and 'takes precedence,' index is '0-based within the language group' with a default of 0, language is required for parser dispatch, and vaultPath 'always wins.' It fully compensates for the undocumented vaultPath parameter and enriches the schema descriptions.

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?

The description opens with 'Read one fenced block's source and language-specific metadata,' which is a specific verb+resource statement. It clearly differentiates this from sibling tools like blocks.list (reads one vs. lists) and blocks.update (read vs. modify), so an agent can identify the right operation without inspecting other schemas.

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?

The description provides clear usage context: locate by blockId (preferred) or index, language is required, and vaultPath overrides the active vault. It does not explicitly name alternatives like blocks.list for finding blocks or blocks.update for modifying them, so it stops short of full when/when-not guidance.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/bezata/kObsidian'

If you have feedback or need assistance with the MCP directory API, please join our Discord server