Skip to main content
Glama
jagoff

obsidian-mcp-complete

by jagoff

obsidian_append_to_note

Add Markdown to a note by appending or prepending content, with the option to create the note if missing.

Instructions

Append or prepend Markdown to a note, optionally creating it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
vaultNoOptional configured vault name. Defaults to the server default vault.
pathYesVault-relative path. Absolute paths and traversal are rejected.
contentYes
createNo
prependNo

Implementation Reference

  • src/tools.ts:488-500 (registration)
    Registration of the obsidian_append_to_note tool with schema and handler delegating to vaults.appendText
    tool(
      "obsidian_append_to_note",
      "Append or prepend Markdown to a note, optionally creating it.",
      {
        vault: vaultArg,
        path: pathArg,
        content: z.string(),
        create: z.boolean().optional().default(false),
        prepend: z.boolean().optional().default(false),
      },
      async (args) => vaults.appendText(vaults.notePath(args.path), args.content, args.vault, args),
      { destructiveHint: false },
    );
  • Zod schema for obsidian_append_to_note: vault (optional), path (required), content (string), create (boolean, default false), prepend (boolean, default false)
    {
      vault: vaultArg,
      path: pathArg,
      content: z.string(),
      create: z.boolean().optional().default(false),
      prepend: z.boolean().optional().default(false),
    },
  • Handler: calls vaults.appendText(vaults.notePath(args.path), args.content, args.vault, args) passing create and prepend options through
    async (args) => vaults.appendText(vaults.notePath(args.path), args.content, args.vault, args),
  • VaultManager.appendText implementation: reads existing content (or creates if option.create), prepends or appends text with separator, writes atomically
    async appendText(
      notePath: string,
      text: string,
      vaultName?: string | null,
      options: { create?: boolean; prepend?: boolean } = {},
    ): Promise<{ path: string; bytes: number }> {
      this.assertWritable();
      const resolved = this.resolvePath(notePath, vaultName);
      let current = "";
      if (fssync.existsSync(resolved.absolute)) {
        current = await fs.readFile(resolved.absolute, "utf8");
      } else if (!options.create) {
        throw new Error(`File does not exist: ${resolved.relative}`);
      }
      await fs.mkdir(path.dirname(resolved.absolute), { recursive: true });
      const separator = current && text && !current.endsWith("\n") && !text.startsWith("\n") ? "\n" : "";
      const out = options.prepend ? `${text}${separator}${current}` : `${current}${separator}${text}`;
      await atomicWrite(resolved.absolute, out);
      this.onInvalidate?.(resolved.vault.name);
      return { path: resolved.relative, bytes: Buffer.byteLength(text, "utf8") };
    }
Behavior2/5

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

The description only mentions 'optionally creating it' but does not disclose behavior when create is false and note is missing, nor idempotency or error states. Annotations provide minimal hints but do not compensate.

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?

Single sentence, 10 words, front-loads the action. No unnecessary information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 5 parameters and no output schema, the description is too sparse. Missing details on return value, error handling, and boundary conditions (e.g., note missing without create).

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?

The description adds meaning for 'prepend' and 'create' parameters, but vault, path, and content are already described in the schema. With 40% schema coverage, the description partially compensates but not fully.

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?

The description clearly states the action (append or prepend Markdown) and the resource (a note), with the option to create it. It distinguishes from siblings like obsidian_create_note (overwrites) and obsidian_patch_note (patches).

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

Usage Guidelines2/5

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

No guidance on when to use this tool vs alternatives such as obsidian_upsert_note or obsidian_create_note. Lack of usage context or exclusion criteria.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jagoff/obsidian-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server