Skip to main content
Glama

Save Note

write_note

πŸ”΄ WRITE β€” save a NOTE to the user's account (this PERSISTS data; it is NOT a read/lookup). Typical flow: FIRST give the user your complete answer as usual, THEN β€” as the final step of the turn β€” call write_note once to keep it.

πŸ”΄ IF YOUR ANSWER CONTAINED A TABLE / NUMERIC COMPARISON, keep it as a MARKDOWN table in `body` β€” lead with
the table, do NOT re-narrate the numbers into prose. Saving a figures answer as a wall of prose is the #1
note-quality failure; preserving structure OUTRANKS "distilling into a paragraph". (The figures are extracted
from these markdown tables later for charts β€” so a clean table with clear headers is what makes that possible.)

CONTENT: `subject` (short title), `body` (MARKDOWN β€” keep tables as tables, absolute headers like `FY2025`),
`summary` (1–2 sentences), `note_type` (reference/tracking/thesis/decision), `category`, `tags` β€” see each field.

ENTITY LINKS make the note findable + joinable to the graph β€” fill whenever the note touches specific things;
the server RESOLVES plain names for you. `stocks` (the subjects) Β· `mentioned_stocks` (referenced) Β· `gics`
(sector/theme, code or plain English) Β· `megatrend_ids` (advanced raw id) Β· `portfolio_id`.

🧭 LINK THE NOTE'S HOME β€” the theme/sector, not just the stocks. If the note is about a TREND/tech/mechanism
("what is HBM", "solid-state batteries") or an established INDUSTRY/SECTOR ("retail", "airlines", "pharma"),
put the word(s) straight in `gics` (plain English — the server resolves each and routes a theme→megatrend).
A note whose subject is a trend or a sector, saved with EMPTY `gics`, means you SKIPPED this. The only correct
empties: a single-stock note (stocks only) or a general concept with no home (P/E, EBITDA β€” don't force it;
tags/body still make it findable by semantic search).

WHEN TO SAVE β€” this is the investor's knowledge base; CAPTURE substantive investment content generously
(reference/understanding, a dated market-read WITH its 'why', a thesis/decision, curated research). Value
is realized on RETRIEVAL, so lean toward keeping. SKIP only the noise floor: chit-chat/thanks, trivial
lookups ("what's the ticker?"), or off-topic non-investment content (save that only if explicitly asked).
An explicit "save this / ΰΈˆΰΈ”ΰΉ„ΰΈ§ΰΉ‰" β†’ always save. Otherwise, if the content is note-worthy, briefly OFFER to
keep it β€” don't nag on every turn, and don't save pure filler.

🏷️ `agent` β€” ALWAYS set this to the app you are running in, chosen from the fixed list:
`Claude` (Claude apps / claude.ai / Desktop), `Claude Code`, `Claude Coworks`, `ChatGPT`, `Codex`,
`Gemini`, or `Other` (anything not listed). It stamps WHICH surface authored the note (provenance in
the user's knowledge base). Pick the single closest match; if genuinely unsure, use `Other`. Do not
invent values β€” only these are accepted.

Owner-scoped. Returns `{id, created_at, linked}` where `linked` confirms what was tied to the graph
(resolved ids + any `unresolved` names).

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": {
      "subject": "<subject>",
      "body": "<body>"
    },
    "name": "write_note"
  }
}

Input Schema

NameRequiredDescriptionDefault
bodyYesThe note's full text in MARKDOWN β€” the distilled answer/observation/thesis to persist. PRESERVE the structure of your answer: any numeric / tabular data goes in a markdown TABLE (pipe syntax `| col | col |`), NEVER flattened into a paragraph of numbers; use headings (##) for sections and bullet lists for points. If you showed the user a table, the note keeps that table.
gicsNoThe note's INDUSTRY/SECTOR or THEME β€” a GICS code OR plain English ('banks', 'semiconductors', 'AI'); the server resolves each and routes a curated theme to a megatrend link. (Derived free if the note names representative stocks.)
tagsNoFree-text tags for retrieval.
agentNoWhich app is writing the note β€” EXACTLY one of: `Claude` | `Claude Code` | `Claude Coworks` | `ChatGPT` | `Codex` | `Gemini` | `Other` (case-sensitive); the server falls back to the connection's client info.
stocksNoPRIMARY stocks/assets the note is ABOUT β€” an exact Ava Advisor ticker OR a plain NAME the SERVER resolves (any asset class; an ambiguous name β†’ reconfirm). ⚠️ A COMMODITY discussed via the trade tools has only an HS code (riceβ†’1006), NOT a ticker β€” just put the NAME here ('rice'β†’resolved to RICE.COMM) so the note links to the commodity.
contextNoOPTIONAL but RECOMMENDED β€” paste the user's FULL request VERBATIM (any language: 'ΰΈ‚ΰΈ­ΰΈ£ΰΈ²ΰΈ„ΰΈ²ΰΈœΰΈ₯ΰΉ„ΰΈ‘ΰΉ‰ apple', 'compare Apple and Microsoft stock'). The server uses it to disambiguate which candidate each `ticker` entity means (the apple COMPANY vs the fruit COMMODITY; which Samsung). One context per call, shared by all tickers here.
subjectYesShort title / subject line of the note.
summaryNoOne-line summary (shown when the note is collapsed).
categoryNoOptional free-text category.
note_typeNo`reference` (concept/understanding) | `tracking` (dated market read) | `thesis` | `decision`.
portfolio_idNoLink the note to one of the user's portfolios, if relevant.
megatrend_idsNoADVANCED β€” raw megatrend node id(s) if you already hold one (e.g. a theme tool's `megatrend.id`). Normally just name the theme in `gics` and the server routes it to a megatrend.
mentioned_stocksNoSecondary tickers merely referenced (a peer named in passing).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false and destructiveHint=false, so the write semantics are partly covered; the description still adds real value by stating the tool is owner-scoped, that the server resolves plain entity names, that `gics` routes themes to megatrends, and what the return payload ({id, created_at, linked} with unresolved names) looks like. However, much of the length is editorial policy about note quality rather than behavior of the call itself, and there is no mention of rate limits, duplicate handling, or what `linked.unresolved` means operationally. Solid additions over annotations, but not a full behavioral picture.

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?

Front-loaded with the core action and a numbered typical flow, then organized under clearly labelled sections (CONTENT, ENTITY LINKS, WHEN TO SAVE, agent) β€” an agent can scan it quickly. It is verbose for a save operation and repeats table-preservation guidance that already appears verbatim in the body schema, so a few sentences do not fully earn their place.

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 13-parameter write tool with no output schema, the description covers the write semantics, the entity-linking model, the return shape, the provenance requirement, and the decision rule for when to invoke β€” everything needed to call it correctly. No material gap remains.

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 description coverage is 100%, so baseline is 3; the description earns above that by adding routing semantics the schema only hints at β€” e.g. that `gics` accepts plain English and the server resolves sectors/themes, that `megatrend_ids` is an advanced escape hatch normally replaced by naming a theme in `gics`, and that `agent` must be one of a fixed enumerated surface list. It omits any treatment of the `context` parameter and does not explain portfolio_id or category beyond what the schema says, so it stops short of full coverage.

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?

Opens with a specific verb+resource: 'save a NOTE to the user's account', and explicitly disambiguates the operation class ('this PERSISTS data; it is NOT a read/lookup'), which cleanly separates it from the retrieval siblings get_note and query_notes.

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?

The 'WHEN TO SAVE' block gives explicit use criteria (capture substantive investment content, lean toward keeping), explicit exclusions (chit-chat/thanks, trivial lookups, off-topic content), and an override rule ('an explicit save this β†’ always save'). It also prescribes timing within the turn, which is a genuine when-to-use instruction rather than inferred guidance.

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.