Skip to main content
Glama
markdown-vault-mcp

markdown-vault-mcp

by pvliesdonk

Note Diff

get_diff
Read-onlyIdempotent

Show how a note or attachment changed since a specific commit or timestamp by returning a unified diff, optionally one diff per commit.

Instructions

Return how a note or attachment changed from an earlier commit to now, as one unified diff or one per commit.

Pass exactly one of since_sha and since_timestamp; find commits with get_history. A vault without git history returns an empty diff.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "path": "<path>"
    },
    "name": "get_diff"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesA note or attachment path, such as `"notes/alpha.md"`; a binary attachment returns a summary of size and renames instead of a patch.
limitNoWith per_commit, how many of the most recent commits to include, 1 to 100; omit for all.
since_shaNoA commit SHA to diff from, such as from get_history; at least 4 hex digits.
per_commitNoTrue for one diff per commit since the starting point, newest first; default false for a single diff.
since_timestampNoAn ISO date or date-time within 1970-2099, such as `"2026-04-01T00:00:00Z"`; `"now"`, `"today"` or `"yesterday"`; or whole numbers of seconds, minutes, hours, days, weeks, months or years followed by `"ago"`, such as `"1 week ago"`. Diffs from the latest commit at or before that time.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv7.1.0
    • changedInput schema / properties / since_timestamp / description
      Previous value: -"An ISO 8601 time; diffs from the latest commit at or before\nit."New value: +"An ISO date or date-time within 1970-2099, such as\n`\"2026-04-01T00:00:00Z\"`; `\"now\"`, `\"today\"` or `\"yesterday\"`; or whole\nnumbers of seconds, minutes, hours, days, weeks, months or years\nfollowed by `\"ago\"`, such as `\"1 week ago\"`. Diffs from the latest\ncommit at or before that time."
  2. Changed5 schema fields changedv6.1.0
    • changedInput schema / properties / limit / description
      Previous value: -"When per_commit=True, cap the number of intervening commits\nreturned to the `limit` most recent ones. Clamped to [1, 100].\nDefaults to null (unbounded — still bounded by the underlying\nsince..HEAD range). Ignored when per_commit=False. Useful for\nkeeping per-commit responses within context budgets when\nauditing long histories."New value: +"With per_commit, how many of the most recent commits to include, 1 to\n100; omit for all."
    • changedInput schema / properties / path / description
      Previous value: -"Vault-relative path of the note or attachment to diff (e.g.\n\"notes/alpha.md\" or \"assets/diagram.png\"). May be a `.md`\nnote or a configured attachment extension (png, pdf, svg, …).\nA binary attachment returns a `--stat` size/rename summary\ninstead of a full unified patch; a text attachment (e.g.\n`.svg`, `.csv`) returns a full unified diff. `.md` notes are\nunchanged. An unsupported extension is rejected."New value: +"A note or attachment path, such as `\"notes/alpha.md\"`; a binary attachment\nreturns a summary of size and renames instead of a patch."
    • changedInput schema / properties / per_commit / description
      Previous value: -"When False (default), return a single unified diff from\nthe reference point to HEAD. When True, return one diff per\nintervening commit."New value: +"True for one diff per commit since the starting point, newest\nfirst; default false for a single diff."
    • changedInput schema / properties / since_sha / description
      Previous value: -"A commit SHA (full or abbreviated, at least 4 hex digits)\nto diff from. Mutually exclusive with since_timestamp."New value: +"A commit SHA to diff from, such as from get_history; at least 4 hex\ndigits."
    • changedInput schema / properties / since_timestamp / description
      Previous value: -"ISO 8601 datetime string, resolved via\n`git rev-list --before=<ts> -1 HEAD` to the most recent\ncommit at or before that instant. Boundary is\n**inclusive**: a commit whose committer date equals\nsince_timestamp IS the resolved ref. Mutually exclusive\nwith since_sha."New value: +"An ISO 8601 time; diffs from the latest commit at or before\nit."
  3. First observedv3.1.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so safety is covered. The description adds real behavior beyond that: the mutual-exclusion constraint on the two 'since' parameters and the fact that a vault without git history yields an empty diff rather than an error.

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?

Three short sentences, front-loaded with what the tool returns, then the key constraint, then the edge case. No filler and nothing repeated from the schema verbatim.

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-value detail is unnecessary, yet the description still conveys the two output shapes and the binary-attachment special case. For a five-parameter read tool with full schema coverage and annotations, nothing an agent needs 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 100%, so the baseline would be 3, but the description adds a cross-parameter rule absent from the schema: exactly one of since_sha and since_timestamp must be supplied. It also reinforces that per_commit toggles between a single diff and one per commit, which is meaningful beyond the per-field text.

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 opens with a specific verb and resource: 'Return how a note or attachment changed from an earlier commit to now', and it names the output shape (one unified diff or one per commit). This distinguishes it clearly from get_history, which is referenced as the way to find commits rather than to see changes.

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?

It gives an explicit usage rule: 'Pass exactly one of since_sha and since_timestamp', and routes the agent to get_history for obtaining a SHA. It also covers the no-git-history case with 'returns an empty diff'. What's missing is a direct statement of when to prefer this over get_history, though the implication is clear.

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