Skip to main content
Glama

Preview a Markdown vault batch

preview_import

Dry run for an agent-led import of notes into Imported//. The server cannot read your disk: read each file yourself and send its text as files: [{ relativePath, markdown }], relativePath being the path inside the folder you import (notes/idea.md: / separators, no leading / or ./ or ..). Only .md files: save a ChatGPT or Claude memory list, JSON or other text as Markdown first and leave attachments out. Names starting with "." are skipped. Returns counts, conflicts (a different file already at the destination is kept, not overwritten; use a new label to import a changed copy), skipped files with reasons, and an expiring batchId; writes no memory. Max 100 files, 64 KiB/file and 128 KiB per call including paths; for more, call again per group. Up to 8 previews can wait at once: apply one, or wait 15 minutes. Refuses unsafe or oversize inputs. Selection: include/exclude path prefixes. stage: false only checks (no batchId, nothing held). Show preview before apply_import.

Input Schema

NameRequiredDescriptionDefault
filesYes
labelYesName for this import; notes go to Imported/<label>/. It is a folder name: letters (any alphabet), digits, "-" and "_" are kept; spaces and punctuation become "-".
stageNofalse: check only. Same answer without a batchId; nothing is held, so nothing can be applied from it
excludeNoLeave these folder or file path prefixes out, e.g. "Private" (prefixes, not globs)
includeNoOnly these folder or file path prefixes, e.g. "Projects" (prefixes, not globs)

Output Schema

NameRequiredDescriptionDefault
okYes
countsYes
limitsYes
stagedNo
batchIdNo
skippedYes
toWriteYes
conflictsYes
expiresAtNo
namespaceYes
unchangedYes
secretGuardNo
unchangedPathsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": {},
      +  "properties": {
      +    "batchId": {
      +      "type": "string"
      +    },
      +    "conflicts": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "counts": {
      +      "additionalProperties": {},
      +      "propertyNames": {
      +        "type": "string"
      +      },
      +      "type": "object"
      +    },
      +    "expiresAt": {
      +      "type": "string"
      +    },
      +    "limits": {
      +      "additionalProperties": {},
      +      "propertyNames": {
      +        "type": "string"
      +      },
      +      "type": "object"
      +    },
      +    "namespace": {
      +      "type": "string"
      +    },
      +    "ok": {
      +      "type": "boolean"
      +    },
      +    "secretGuard": {
      +      "additionalProperties": {},
      +      "propertyNames": {
      +        "type": "string"
      +      },
      +      "type": "object"
      +    },
      +    "skipped": {
      +      "items": {
      +        "additionalProperties": {},
      +        "propertyNames": {
      +          "type": "string"
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "staged": {
      +      "type": "boolean"
      +    },
      +    "toWrite": {
      +      "type": "number"
      +    },
      +    "unchanged": {
      +      "type": "number"
      +    },
      +    "unchangedPaths": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "ok",
      +    "namespace",
      +    "counts",
      +    "conflicts",
      +    "unchanged",
      +    "toWrite",
      +    "skipped",
      +    "limits"
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Discloses behavior far beyond the annotations: the server cannot read disk so the agent must supply text, non-.md files must be converted, dot-prefixed names are skipped, conflicting destinations are kept rather than overwritten, and the returned payload includes counts, skipped reasons, and an expiring batchId. Resource limits (100 files, 64 KiB/file, 128 KiB/call), the concurrency cap of 8 pending previews with a 15-minute expiry, and the refusal of unsafe/oversize input are all stated.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Information-dense and front-loaded, with no filler sentences. It is on the long side and packs limits, conflicts, and selection into run-on clauses, so scanning takes effort, but every clause carries operational content.

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?

For a staged mutation with an output schema, an agent has everything needed: input construction rules, file-count and size budgets, conflict and skip semantics, batch lifetime, and the required follow-up to apply_import. Nothing material is missing.

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?

With schema coverage at 80% the baseline would be 3, but the description adds real meaning: the relativePath format rules (/ separators, no leading /, ./ or ..), the include/exclude prefix semantics (prefixes, not globs), and the stage flag's consequence (no batchId, nothing held). This goes beyond the schema's field-level prose.

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?

Opening sentence names the exact operation and destination: 'Dry run for an agent-led import of notes into Imported/<label>/.' The verb+resource+scope is unmistakable, and 'Show preview before apply_import' distinguishes it from apply_import and undo_import among the siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly directs the agent to 'Show preview before apply_import', explains the stage:false check-only mode, tells the agent to call again per group over 100 files, and recommends a new label when importing a changed copy after a conflict. When-to-use and alternatives are both covered.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.