Skip to main content
Glama
bezata

kObsidian MCP

Read Fenced Block

blocks.read
Read-onlyIdempotent

Read the source and language-specific metadata of a fenced code block from an Obsidian note. Locate by block ID (preferred) or zero-based index within its language group. Requires file path and block language for correct parsing.

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
filePathYesPath of the note containing the block.
languageYesLanguage of the block to read (required so `blocks.read` can dispatch to the correct parser).
blockIdNoStable block identifier (e.g. `^abc123`). Takes precedence over `index` when both are given.
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).
vaultPathNo

Output Schema

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

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

Annotations already declare readOnlyHint=true, destructiveHint=false, idempotentHint=true. The description adds behavioral details: it fails with not_found, operates on the active vault unless vaultPath is given, and language-specific dispatching. No contradictions.

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 two short paragraphs, front-loaded with the main purpose and key parameter behaviors. Every sentence adds value without redundancy.

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 the 5 parameters, clear annotations, and presence of an output schema, the description covers all necessary context: how to specify location (blockId/index), required language, vault behavior, and failure mode. No 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 high (80%) with descriptions for most parameters. The description adds value by clarifying blockId is preferred, index defaults to 0, and language is required for parser dispatch. This provides context beyond the schema.

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 clearly states the tool reads a fenced block's source and metadata, using specific locators (blockId or index). It distinguishes itself from sibling tools like blocks.list (list blocks) and blocks.update (update blocks) by being a read operation.

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 explains how to locate the block (by blockId or index) and the required language parameter, but does not explicitly contrast with alternative tools like blocks.list or blocks.update. The read-only nature is stated, implying when to use, but no direct 'use this instead of X' guidance.

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

Install Server

Other Tools

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