Skip to main content
Glama

Shard Connector for Obsidian

Replace note

write_note
DestructiveIdempotent

Replace the whole content of an existing note. Obsidian Sync only syncs .md, .canvas and .base files here, so other extensions such as .txt fail. Fails if the note doesn't exist; use create_note for new notes. Prefer patch_note for partial changes. Pass expected_sha256 from read_note's hash, or from a previous write's sha256, to fail instead of overwriting a change made meanwhile. Returns once Obsidian Sync has the note, or after about 35s with status upload_pending. A repeat write within 10 to 30s of the note's last upload returns at once with status waiting_for_upload; it still uploads.

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>",
      "content": "<content>"
    },
    "name": "write_note"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesvault-relative path of an existing note, as returned by list_files or search_notes, or an obsidian:// URL for a file in this vault
contentYesfull new content of the note; may be empty
expected_sha256NoSHA-256 of the content you last saw: the hash read_note returns (with or without its sha256: prefix) or a previous write's sha256. The write fails if the note differs

Output Schema

NameRequiredDescriptionDefault
pathYesvault-relative path of the note
bytesYessize of the note's content in bytes
sha256YesSHA-256 of the note's content; pass it as expected_sha256 to the next write_note
statusYesuploaded: Obsidian Sync has the note. waiting_for_upload: the note is saved, and Obsidian Sync uploads it within 30s, because it holds back a note's next upload for 10 to 30s after the last one. upload_pending: the note is saved, but its upload wasn't confirmed within 35s, or an earlier write of the note is still queued, for example because the server is reconnecting to Obsidian Sync; it uploads once the connection is back
changedYesfalse when the note already held this content, so nothing was written
uploadedYeswhether Obsidian Sync has the note; if false it is saved and still queued for upload, as status explains

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the destructive/idempotent annotations, it discloses file-type limits (.md, .canvas, .base only, with .txt failing), the failure mode for missing notes, optimistic-concurrency behavior via expected_sha256, and the sync-completion semantics including the ~35s upload_pending fallback and the 10-30s waiting_for_upload shortcut. That is unusually rich behavioral detail a caller could not infer from the annotations.

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?

The core operation is front-loaded in the first sentence and alternatives follow immediately. The sync-timing sentences are dense and somewhat long, but each carries information an agent needs to interpret a pending/waiting status rather than boilerplate.

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 destructive write tool with three parameters, the description covers failure modes, concurrency control, file-type constraints, and return timing. An output schema exists, yet the description still explains the meaningful status values, leaving no material gap before invocation.

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 a baseline of 3 applies, but the description adds cross-tool provenance for expected_sha256 (from read_note's hash or a previous write's sha256) and characterizes content as the full replacement, which the schema alone does not fully convey. Modest but real added meaning.

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?

"Replace the whole content of an existing note" gives a specific verb (replace) plus the scope of the operation (whole content), which cleanly separates it from patch_note's partial update and create_note's new-note path. An agent can identify the tool's job without consulting 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 Guidelines5/5

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

It states explicit routing rules: use create_note for notes that don't exist, and prefer patch_note for partial changes. It also gives the condition for supplying expected_sha256 (to fail instead of clobbering a concurrent change), so the when and when-not 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.

Resources