Skip to main content
Glama
Linkly AI

Linkly AI

Official

note_save

Creates or edits a local markdown note in your Notes folder, with version-safe edits and automatic YAML metadata handling.

Instructions

Create or edit a local markdown card note in the user's Notes folder (mode="create" | "edit"). Notes are plain markdown files owned by the user; the server generates all YAML metadata. Create: pass content (markdown body WITHOUT YAML); optional tags. Body markdown is whitelist-checked (R14, UI toolbar subset): paragraphs/line breaks, bold, strikethrough, ordered/unordered lists, plain text only — headings, italics, quotes, code, links, tables, task lists, images and raw HTML are rejected with NOTE_INVALID_INPUT. Inline #tags in the body (outside code) become the note's tags — the body is the single source of truth for tags; the optional tags parameter adds extra tags and the server appends their #tokens to the body. Only add tags the user explicitly asked for. Write # for a literal # that is not a tag (e.g. issue numbers: #114). Edit (CAS loop): list (scope="notes") → get note_id + version → read the current full content via read(doc_id) → note_save with mode="edit", note_id, base_version=, and the NEW full content — keep the #tag tokens you want to keep, delete a #token to remove that tag (tags is optional and can only add). A stale base_version returns NOTE_VERSION_CONFLICT with the actual version — re-read, merge, retry; never overwrite blindly. Every success response returns the note's effective content (the server may have appended #tokens to what you submitted) plus its version: base any follow-up edit on that returned content, never on the content you sent. Notes not yet indexed have doc_id=null: wait for indexing, or edit your own just-created note using the version and content returned by note_save. Never rewrite a note from its snippet alone. Optional app_name: the display name of the APPLICATION hosting this conversation (NOT the model name), shown as the note's source badge — omit it entirely if unsure. There is no delete tool — deletion is user-only in the app UI.

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": {
      "mode": "<mode>",
      "content": "<content>"
    },
    "name": "note_save"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeYesOperation mode: "create" writes a new note; "edit" rewrites an existing one. Edit REQUIRES note_id AND base_version — missing fields return NOTE_INVALID_INPUT with a fix example.
tagsNoExtra tags to add — optional for both modes, unioned with the body's #tags. POLICY (R14): do NOT add tags on your own initiative — only pass tags the user explicitly asked for; never invent them. Tags missing from the body are appended to it as #tokens by the server (the body stays the single source of truth for tags). This parameter cannot remove tags — to remove one, delete its #token from `content`. Normalization: leading '#' stripped, ASCII letters lowercased.
contentYesMarkdown body without YAML front matter. The server generates and owns all YAML metadata (note_id, timestamps, source, tags). ALLOWED markdown (R14 whitelist = UI toolbar subset, enforced at AST level): paragraphs/line breaks, bold, strikethrough, ordered/unordered lists, plain text (bare URLs as plain text are fine). EVERYTHING ELSE is rejected — headings, italics, blockquotes, inline code, code blocks, links, images, raw HTML, thematic breaks, GFM tables, task lists and footnotes — with NOTE_INVALID_INPUT listing the offending constructs (edits may keep constructs the note already contains, but must not introduce new forbidden kinds). Inline #tags in the body (outside code) ARE the note's tag set — the body is the single source of truth for tags. To write a literal # that must NOT become a tag (issue or PR numbers such as #114 or api#43), escape it as \#114 — the app shows it as #114. To remove a tag on edit, delete its #token from the body; to keep tags, keep their #tokens. Legacy tags stored only in YAML (no #token in the body yet) are preserved on edit: the server appends their #tokens to your content (one-time in-place migration); delete such a token in a later edit to remove that tag.
note_idNoNote UUID. Required for mode="edit" (identifies the note). Optional for mode="create" and reserved for future cloud sync — a create carrying an existing note_id is rejected as NOTE_DUPLICATE_ID.
app_nameNoDisplay name of the HOST APPLICATION this conversation runs inside (e.g. "Cursor", "Cherry Studio", "Claude Desktop") — shown as the note's source badge in the app. This is the application's name, NOT your model name. OMIT this parameter entirely unless you are certain which application hosts this conversation — a missing value shows a neutral badge, a wrong value misleads the user. Max 64 characters. Accepted on both create and edit.
base_versionNoThe note's current version hash (sha256 of the raw file), required for mode="edit". Obtain it from `list` (scope="notes") or a previous note_save response. A stale value returns NOTE_VERSION_CONFLICT with the actual version — re-read before retrying; never overwrite blindly.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4.5/5.0
Behavior4/5

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

The only annotation is readOnlyHint=false, which just confirms this is a write; the description carries the real burden and does so well — whitelist-enforced markdown rejections with NOTE_INVALID_INPUT, server-owned YAML, server appending #tokens to submitted content, legacy YAML tag migration, and doc_id=null before indexing. Minor gap: no note on size limits or failure behavior for concurrent creates beyond NOTE_DUPLICATE_ID.

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

Conciseness3/5

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

Front-loaded with purpose and mode split, and the "Create:" / "Edit (CAS loop):" labels help navigation, but the block is long and repeats the body-is-source-of-truth-for-tags idea several times, much of which is duplicated in the schema descriptions.

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 6-parameter mutation tool with a strict whitelist and CAS-based concurrency, the description covers validation failures, conflict recovery, tag migration, indexing delay, and the returned version/content contract. Nothing an agent needs to invoke it safely is missing, and no output schema exists to offload explanation to.

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 baseline is 3; the description still adds genuine meaning beyond it, notably that `tags` can only add and never remove (removal requires deleting the #token from `content`), that follow-up edits must be based on the returned content rather than what was submitted, and the app_name vs. model-name distinction.

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: "Create or edit a local markdown card note in the user's Notes folder," and immediately splits the two modes with mode="create" | "edit". It also distinguishes itself from siblings by naming `list` and `read` as the entry points for the edit workflow, and explicitly notes there is no delete tool.

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?

Gives explicit routing: for edits, list(scope="notes") then read(doc_id) then note_save with base_version, with the failure path (NOTE_VERSION_CONFLICT, re-read, merge, retry). It also states exclusions and cautions: "Never rewrite a note from its snippet alone," "never overwrite blindly," "Only add tags the user explicitly asked for," and "omit app_name entirely if unsure."

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