Skip to main content
Glama

Import from Markdown Files

import_markdown

Imports frontmattered Markdown files into a journal, updating existing entries by mj_id or creating new ones and reconciling tags and relationships; use dry_run to preview changes.

Instructions

Import frontmattered Markdown files (.md) into the journal. If a file has an mj_id in its frontmatter and the entry exists, it is updated. Otherwise, a new entry is created. Tags and relationships are reconciled automatically. Use dry_run: true to preview what would happen without writing.

Input Schema

NameRequiredDescriptionDefault
limitNoMax files to process (default: 100, max: 500)
dry_runNoParse and validate without writing to database
source_dirNoDirectory containing .md files to import. Anti-Hallucination Hint: Do NOT use path or filepath, use source_dir.
workspace_idNoOptional workspace isolation identifier (e.g. "alpha"). Do not use numeric project IDs or "workspace" as the key.
project_numberNo

Output Schema

NameRequiredDescriptionDefault
codeNoError code (e.g. VALIDATION_ERROR, INTERNAL_ERROR)
errorNoHuman-readable error message
errorsNo
createdNo
detailsNoAdditional error context
dry_runNo
skippedNo
successNo
updatedNo
categoryNoError category (validation, query, connection, internal)
suggestionNoSuggested fix for the error
recoverableNoWhether the error is recoverable
vectorsIndexedNo
aggregated_errorsNoDetails of individual errors in a multi-step operation
relationshipsLinkedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv9.0.0

TDQS

A4/5.0
Behavior4/5

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

Goes well beyond the annotations by disclosing the upsert rule, that tags and relationships are reconciled automatically, and that dry_run is a non-writing preview. It does not cover partial-failure behavior, what happens to entries absent from the files, or the 500-file cap interplay with limit.

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?

Four short sentences, front-loaded with the identity of the tool and immediately followed by the create-vs-update rule. No filler or restated title.

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?

An output schema exists, so return values need no explanation, and annotations cover the write/safety profile. The description is nearly complete for an importing mutation; only error/permission behavior and the effect of limit are unstated.

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

Parameters3/5

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

Schema coverage is 80%, so the schema already carries parameter meaning; the description only restates dry_run as a preview. source_dir, limit, workspace_id, and project_number get no added explanation or constraints from the description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource with a distinguishing qualifier: 'Import frontmattered Markdown files (.md) into the journal.' This separates it from export_markdown and import_external by format, though it never names a sibling to route away from.

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?

Gives the essential selection logic for its two modes: an mj_id in frontmatter updates an existing entry, otherwise a new one is created, and dry_run previews. It does not say when to prefer import_external or team_import_markdown, which is the remaining gap.

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

Deploy Server

Other Tools