Parse Kanban Board
kanban.parseExtract the full structure of a Kanban board from its Markdown file: column names, card titles, and completion status. Works with Obsidian's Kanban plugin format. Use for retrieving complete board content.
Instructions
Parse a markdown Kanban board file into its column/card structure. Use this when you need the full board content — each column's name and its cards with their completion state. Works with the obsidian-kanban plugin's markdown format. Read-only. For completion counts and ratios instead of the full card list, use kanban.stats.
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
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | Yes | Path of the Kanban board note (`.md`). | |
| vaultPath | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | Yes | ||
| columns | Yes |
Implementation Reference
- src/domain/kanban.ts:150-170 (handler)Core handler function for kanban.parse. Reads a markdown Kanban board file from the vault, parses it into column/card structure, and returns the board representation with filePath, totalCards, and columns (each with name, cardCount, and cards).
export async function parseKanbanBoard( context: DomainContext, args: { filePath: string; vaultPath?: string }, ) { const vaultRoot = requireVaultPath(context, args.vaultPath); const absolutePath = resolveVaultPath(vaultRoot, args.filePath); const content = await readUtf8(absolutePath); const board = parseKanbanStructure(content, args.filePath); return { filePath: args.filePath, totalCards: board.columns.reduce( (count, column) => count + flattenCards(column.cards).length, 0, ), columns: board.columns.map((column) => ({ name: column.name, cardCount: flattenCards(column.cards).length, cards: column.cards, })), }; } - src/schema/kanban.ts:9-13 (schema)Input schema for kanban.parse. Accepts filePath (vault-relative .md path) and optional vaultPath.
export const kanbanParseArgsSchema = z .object(commonBoardFields) .strict() .describe("Arguments for `kanban.parse`."); export type KanbanParseArgs = z.input<typeof kanbanParseArgsSchema>; - src/schema/kanban.ts:66-85 (schema)Output schema for kanban.parse. Defines the response shape with filePath and an array of columns, each containing a name and cards array with text and completed status.
export const kanbanBoardOutputSchema = z .object({ filePath: z.string(), columns: z.array( z .object({ name: z.string(), cards: z.array( z .object({ text: z.string(), completed: z.boolean(), }) .passthrough(), ), }) .passthrough(), ), }) .passthrough(); - src/server/tools/kanban.ts:22-34 (registration)Tool registration for kanban.parse. Defines name, description, input/output schemas, annotations (READ_ONLY), and the inline handler that delegates to parseKanbanBoard in the domain layer.
{ name: "kanban.parse", title: "Parse Kanban Board", description: "Parse a markdown Kanban board file into its column/card structure. Use this when you need the full board content — each column's name and its cards with their completion state. Works with the obsidian-kanban plugin's markdown format. Read-only. For completion counts and ratios instead of the full card list, use `kanban.stats`.", inputSchema: kanbanParseArgsSchema, outputSchema: kanbanBoardOutputSchema, annotations: READ_ONLY, handler: async (context, rawArgs) => { const args = kanbanParseArgsSchema.parse(rawArgs) as KanbanParseArgs; return parseKanbanBoard(context, args); }, }, - src/server/registry.ts:7-34 (registration)Tool registry that includes kanbanTools (which contains kanban.parse) via spread into the central toolRegistry array.
import { kanbanTools } from "./tools/kanban.js"; import { linkTools } from "./tools/links.js"; import { marpTools } from "./tools/marp.js"; import { noteTools } from "./tools/notes.js"; import { systemTools } from "./tools/system.js"; import { tagTools } from "./tools/tags.js"; import { taskTools } from "./tools/tasks.js"; import { templateTools } from "./tools/templates.js"; import { vaultTools } from "./tools/vaults.js"; import { wikiTools } from "./tools/wiki.js"; export const toolRegistry: ToolDefinition[] = [ ...vaultTools, ...noteTools, ...tagTools, ...linkTools, ...analyticsTools, ...taskTools, ...dataviewTools, ...blocksTools, ...marpTools, ...kanbanTools, ...canvasTools, ...templateTools, ...apiTools, ...wikiTools, ...systemTools, ];