UNPKG

obsidian-mcp-server

Version:

MCP server for Obsidian vaults — read, write, search, and surgically edit notes, tags, and frontmatter via the Local REST API plugin. STDIO or Streamable HTTP.

21 lines 1.11 kB
/** * @fileoverview Client-side section extraction from a NoteJson body. * The upstream Local REST API exposes section *targeting* for PATCH but not * section-extracted GET, so we slice the markdown ourselves for `format: 'section'`. * @module services/obsidian/section-extractor */ import type { NoteJson, SectionTarget } from './types.js'; /** * Extract a section's raw markdown (heading/block) or JSON value (frontmatter). * Throws `NotFound` if the target does not exist in the note. */ export declare function extractSection(note: NoteJson, section: SectionTarget): string | unknown; /** * Mark line indices that fall inside fenced code blocks (` ``` ` or `~~~`) so * downstream scanning doesn't false-match on markdown-about-markdown notes. * The closer must match the opener's fence char, have at least as many fence * chars, and carry no info string (per CommonMark). An unclosed fence extends * to EOF. Pass `from` to skip a leading frontmatter block. */ export declare function computeFenceMask(lines: string[], from?: number): boolean[]; //# sourceMappingURL=section-extractor.d.ts.map