Skip to main content
Glama

Apply a previewed Markdown batch

apply_import
Idempotent

Apply preview_import batchId within 15 minutes (same tenant process). Additive: preserves existing different files and reports conflicts. Immediately keyword searchable; on a workspace with semantic search the new notes are then embedded in the background (memory_status says semantic: false until they are). No fact extraction. Returns batchId for undo_import; retries are idempotent.

Input Schema

NameRequiredDescriptionDefault
batchIdYes

Output Schema

NameRequiredDescriptionDefault
okYes
recallNo
batchIdYes
conflictsNo
indexRowsNo
namespaceNo
destinationNo
notesWrittenNo
eventsAppendedNo
ledgerReplayedNo
notesUnchangedNo
notesConflictingNo
eventsAlreadyPresentNo

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"
      +    },
      +    "destination": {
      +      "anyOf": [
      +        {
      +          "additionalProperties": {},
      +          "propertyNames": {
      +            "type": "string"
      +          },
      +          "type": "object"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "eventsAlreadyPresent": {
      +      "type": "number"
      +    },
      +    "eventsAppended": {
      +      "type": "number"
      +    },
      +    "indexRows": {
      +      "additionalProperties": {},
      +      "propertyNames": {
      +        "type": "string"
      +      },
      +      "type": "object"
      +    },
      +    "ledgerReplayed": {
      +      "type": "number"
      +    },
      +    "namespace": {
      +      "type": "string"
      +    },
      +    "notesConflicting": {
      +      "type": "number"
      +    },
      +    "notesUnchanged": {
      +      "type": "number"
      +    },
      +    "notesWritten": {
      +      "type": "number"
      +    },
      +    "ok": {
      +      "type": "boolean"
      +    },
      +    "recall": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "ok",
      +    "batchId"
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the annotations: additive semantics that preserve differing existing files, conflict reporting, immediate keyword-searchability vs. deferred background embedding with the observable `semantic: false` signal in memory_status, no fact extraction, and idempotent retries. This is exactly the context an agent needs to set expectations after a write.

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?

Front-loads the action and its precondition, then layers behavior in short declarative clauses with no filler. The telegraphic fragments ('No fact extraction.') are dense but slightly clipped, keeping it just shy of ideal readability.

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?

An output schema exists, so return values need not be explained, yet the description still clarifies that the returned batchId feeds undo_import. Combined with the timing, conflict, and embedding details, nothing needed to call this correctly is missing.

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 0% — the schema only constrains batchId to a UUID with no description. The description compensates by explaining where batchId comes from (preview_import), that it is bound to a tenant process, and that it expires in 15 minutes, which is meaningful beyond the raw type.

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?

States a specific verb and resource ('Apply preview_import batchId') and makes clear it is the commit step of a two-step import flow, distinguishing it from preview_import (which produces the batch) and undo_import (which reverses it). An agent can route correctly without opening the schema.

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?

Explicitly ties usage to a preceding preview_import call and gives a hard constraint ('within 15 minutes, same tenant process'). It does not say what to do if the window expired (re-preview?) or when to prefer undo_import, so it stops short of full when/when-not guidance.

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.