Skip to main content
Glama

Linkly AI

note_save

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. Body markdown is whitelist-checked (R14, UI toolbar subset — the content description lists what is allowed and rejected). Inline #tags in the body are the note's tags — the body is the single source of truth for tags; the tags parameter can only add. 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. A stale base_version returns NOTE_VERSION_CONFLICT — re-read, merge, retry; never overwrite blindly. Every success response returns the note's effective content (the server may have appended #tokens) plus its version: base any follow-up edit on that returned content, never on what you sent — notes not yet indexed have doc_id=null, so this is also how you edit a note you just created. Never rewrite a note from its snippet alone.

Optional app_name: the display name of the application you are running inside, e.g. "ChatGPT" or "Cursor" (the APPLICATION, not your model). Over an OAuth connection the server fills it in for you.

There is no delete tool — deletion is user-only in the app UI.

Scope: notes exist only on the user's Desktop. This tool takes no library parameter, always writes through the Desktop tunnel, and can never target a cloud library — there is no cloud notes store to fall back on. Desktop must be online.

Redacted values: in notes read through this server, sensitive values appear as [REDACTED:<kind> L<n>] — L<s>-<e> when the value spans several lines, such as a private key — where the numbers are lines of the note file. When editing, keep every line that holds a marker as you read it: you may move, copy, re-indent or delete the whole line (delete it only when the user asks), but do not change any other text on it. On save the Desktop puts the original values back, or returns NOTE_REDACTED_CONTENT when it cannot. Never write markers from search, grep or cloud results into a note, and never write a marker yourself; to change a hidden value, ask the user for the new value.

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. This parameter cannot remove tags — to remove one, delete its #token from `content`. Normalization: leading '#' stripped, ASCII letters lowercased. CAUTION: Desktops older than 0.11.0 instead REQUIRE tags on edit and replace the whole set with it — if the edit fails or tags vanish, ask the user to update the Desktop app.
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. Remove a tag by deleting its #token; keep tags by keeping 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 migration); delete the token later to remove such a 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 — shown as the note's source badge (e.g. "ChatGPT", "Claude", "Cursor", "Cherry Studio"). Fill it in when you know which app you are running inside; leave it out when you genuinely do not. It is the APPLICATION name, not your model name — if the only name you are sure of is the model ("GPT-5", "Claude Opus"), omit the parameter rather than sending that. Over an OAuth connection the server already knows which client is calling and fills this in for you, so sending nothing there is safe. Max 64 characters. Accepted on both create and edit. Requires an up-to-date Desktop: older Desktops reject the parameter with invalid_params — if the save fails that way, retry without app_name. Sending `null` is the same as omitting.
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 observed

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the annotations (readOnly=false, destructive=false, idempotent=false), the description discloses rich behavior: CAS conflict handling, server-appended tag tokens, whitelist enforcement at the AST level, redaction markers and their restoration, old-Desktop compatibility failures, and the exact error codes returned. Nothing contradicts the annotations; the non-idempotent CAS behavior is consistent with idempotentHint=false.

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 description is front-loaded with purpose and the edit loop, then moves to scope and redaction caveats, so structure is sound. It is long but dense with operational detail; some tag-policy and app_name guidance repeats what the schema descriptions already say, which keeps it from a 5.

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 complex mutation tool with no output schema, the description covers return values (effective content plus version), error recovery, redaction handling, Desktop-online requirements, and legacy Desktop fallbacks. An agent has everything needed to invoke it correctly and recover from the documented failure modes.

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?

Schema description coverage is 100% and each parameter already carries an exhaustive description covering mode, tags, content, note_id, app_name, and base_version. The prose adds workflow context around base_version and app_name, but parameter-level meaning is largely duplicated from the schema rather than extended beyond it, so the baseline 3 applies.

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 first sentence states a specific verb and resource — create or edit a local markdown card note in the user's Notes folder — and names both modes explicitly. It also distinguishes itself from sibling read/list tools by describing the edit workflow that chains through them, so an agent can tell what this tool does 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 Guidelines5/5

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

It gives an explicit step-by-step edit loop (list → get note_id + version → read → note_save with base_version and new full content), names the sibling tools to use at each step, and states the retry behavior on NOTE_VERSION_CONFLICT. It also states a hard exclusion — there is no delete tool, deletion is user-only — and clarifies the Desktop-only scope with no cloud fallback.

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