Skip to main content
Glama

Create or update note

upsert_note
Idempotent

Create or update a real Pretext note. Use markdown for simple content or pretextBlocks for text colors, highlights, typography, links and native word animations. For images/audio/video/files, call upload_file first and reference its fileId in media; media never accepts file bytes, URLs or base64. Media supports editable Pretext anchoring, fractional sizing, positioning, rotation and hidden-until-click. Omit folderId to create at the workspace root.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
mediaNo
titleYes
noteIdNo
folderIdNo
markdownNoSimple semantic content. Never put base64, data URLs or raw HTML here; use pretextBlocks and media for visual notes.
contentModeNo
parentNoteIdNo
pretextBlocksNoNative visual Pretext blocks. Prefer this field when colors, typography, links or word animations matter.
idempotencyKeyYes
expectedUpdatedAtNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
titleYes
folderIdYes
geometryYes
markdownYes
updatedAtYes
parentNoteIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / pretextBlocks / items / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "align": {
      -        "enum": [
      -          "left",
      -          "center",
      -          "right",
      -          "justify"
      -        ],
      -        "type": "string"
      -      },
      -      "lineHeight": {
      -        "maximum": 3,
      -        "minimum": 1,
      -        "type": "number"
      -      },
      -      "runs": {
      -        "items": {
      -          "additionalProperties": false,
      -          "properties": {
      -            "animation": {
      -              "description": "Native durable Pretext word animation.",
      -              "enum": [
      -                "wave",
      -                "pulse",
      -                "rainbow",
      -                "bounce",
      -                "float",
      -                "shake",
      -                "swing",
      -                "spin",
      -                "typewriter",
      -                "sparkle",
      -                "gradient"
      -              ],
      -              "type": "string"
      -            },
      -            "backgroundColor": {
      -              "$ref": "#/properties/pretextBlocks/items/anyOf/0/properties/runs/items/properties/textColor",
      -              "description": "Highlight color as #RRGGBB."
      -            },
      -            "bold": {
      -              "description": "Render this run with native Pretext bold styling.",
      -              "type": "boolean"
      -            },
      -            "fontFamily": {
      -              "description": "A font available in the NotePom Pretext renderer.",
      -              "enum": [
      -                "inherit",
      -                "literata",
      -                "atkinson"
      -              ],
      -              "type": "string"
      -            },
      -            "fontSize": {
      -              "description": "Font size in CSS pixels.",
      -              "maximum": 96,
      -              "minimum": 8,
      -              "type": "number"
      -            },
      -            "href": {
      -              "description": "Safe HTTP(S) or mailto link for this run.",
      -              "format": "uri",
      -              "maxLength": 2000,
      -              "type": "string"
      -            },
      -            "italic": {
      -              "description": "Render this run with native Pretext italic styling.",
      -              "type": "boolean"
      -            },
      -            "letterSpacing": {
      -              "description": "Letter spacing in em.",
      -              "maximum": 0.3,
      -              "minimum": -0.05,
      -              "type": "number"
      -            },
      -            "text": {
      -              "description": "Literal text for this visual run. Raw HTML is escaped.",
      -              "maxLength": 100000,
      -              "type": "string"
      -            },
      -            "textColor": {
      -              "description": "Text color as #RRGGBB.",
      -              "pattern": "^#[0-9a-fA-F]{6}$",
      -              "type": "string"
      -            }
      -          },
      -          "required": [
      -            "text"
      -          ],
      -          "type": "object"
      -        },
      -        "maxItems": 200,
      -        "minItems": 1,
      -        "type": "array"
      -      },
      -      "type": {
      -        "const": "paragraph",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "type",
      -      "runs"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "align": {
      -        "enum": [
      -          "left",
      -          "center",
      -          "right"
      -        ],
      -        "type": "string"
      -      },
      -      "level": {
      -        "enum": [
      -          1,
      -          2,
      -          3
      -        ],
      -        "type": "number"
      -      },
      -      "runs": {
      -        "$ref": "#/properties/pretextBlocks/items/anyOf/0/properties/runs"
      -      },
      -      "type": {
      -        "const": "heading",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "type",
      -      "level",
      -      "runs"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "items": {
      -        "items": {
      -          "$ref": "#/properties/pretextBlocks/items/anyOf/0/properties/runs"
      -        },
      -        "maxItems": 100,
      -        "minItems": 1,
      -        "type": "array"
      -      },
      -      "type": {
      -        "const": "bulletList",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "type",
      -      "items"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "align": {
      +        "enum": [
      +          "left",
      +          "center",
      +          "right",
      +          "justify"
      +        ],
      +        "type": "string"
      +      },
      +      "lineHeight": {
      +        "maximum": 3,
      +        "minimum": 1,
      +        "type": "number"
      +      },
      +      "runs": {
      +        "items": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "animation": {
      +              "description": "Native durable Pretext word animation.",
      +              "enum": [
      +                "wave",
      +                "pulse",
      +                "rainbow",
      +                "bounce",
      +                "float",
      +                "shake",
      +                "swing",
      +                "spin",
      +                "typewriter",
      +                "sparkle",
      +                "gradient"
      +              ],
      +              "type": "string"
      +            },
      +            "backgroundColor": {
      +              "$ref": "#/properties/pretextBlocks/items/anyOf/0/properties/runs/items/properties/textColor",
      +              "description": "Highlight color as #RRGGBB."
      +            },
      +            "bold": {
      +              "description": "Render this run with native Pretext bold styling.",
      +              "type": "boolean"
      +            },
      +            "fontFamily": {
      +              "description": "A font available in the NotePom Pretext renderer.",
      +              "enum": [
      +                "inherit",
      +                "literata",
      +                "atkinson"
      +              ],
      +              "type": "string"
      +            },
      +            "fontSize": {
      +              "description": "Font size in CSS pixels.",
      +              "maximum": 96,
      +              "minimum": 8,
      +              "type": "number"
      +            },
      +            "href": {
      +              "description": "Safe HTTP(S) or mailto link for this run.",
      +              "format": "uri",
      +              "maxLength": 2000,
      +              "type": "string"
      +            },
      +            "italic": {
      +              "description": "Render this run with native Pretext italic styling.",
      +              "type": "boolean"
      +            },
      +            "letterSpacing": {
      +              "description": "Letter spacing in em.",
      +              "maximum": 0.3,
      +              "minimum": -0.05,
      +              "type": "number"
      +            },
      +            "strikethrough": {
      +              "description": "Strike through this run without replacing its other styles.",
      +              "type": "boolean"
      +            },
      +            "text": {
      +              "description": "Literal text for this visual run. Raw HTML is escaped.",
      +              "maxLength": 100000,
      +              "type": "string"
      +            },
      +            "textColor": {
      +              "description": "Text color as #RRGGBB.",
      +              "pattern": "^#[0-9a-fA-F]{6}$",
      +              "type": "string"
      +            },
      +            "underline": {
      +              "description": "Underline this run without replacing its other styles.",
      +              "type": "boolean"
      +            }
      +          },
      +          "required": [
      +            "text"
      +          ],
      +          "type": "object"
      +        },
      +        "maxItems": 200,
      +        "minItems": 1,
      +        "type": "array"
      +      },
      +      "type": {
      +        "const": "paragraph",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "type",
      +      "runs"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "align": {
      +        "enum": [
      +          "left",
      +          "center",
      +          "right"
      +        ],
      +        "type": "string"
      +      },
      +      "level": {
      +        "enum": [
      +          1,
      +          2,
      +          3
      +        ],
      +        "type": "number"
      +      },
      +      "runs": {
      +        "$ref": "#/properties/pretextBlocks/items/anyOf/0/properties/runs"
      +      },
      +      "type": {
      +        "const": "heading",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "type",
      +      "level",
      +      "runs"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "items": {
      +        "items": {
      +          "$ref": "#/properties/pretextBlocks/items/anyOf/0/properties/runs"
      +        },
      +        "maxItems": 100,
      +        "minItems": 1,
      +        "type": "array"
      +      },
      +      "type": {
      +        "const": "bulletList",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "type",
      +      "items"
      +    ],
      +    "type": "object"
      +  }
      +]
  2. Changed13 schema fields changed
    • addedInput schema / $schema
      Added value: +"http://json-schema.org/draft-07/schema#"
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / contentMode
      Added value: +{
      +  "enum": [
      +    "replace",
      +    "append",
      +    "prepend"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / expectedUpdatedAt
      Added value: +{
      +  "format": "date-time",
      +  "type": "string"
      +}
    • addedInput schema / properties / folderId
      Added value: +{
      +  "$ref": "#/properties/noteId"
      +}
    • addedInput schema / properties / idempotencyKey
      Added value: +{
      +  "maxLength": 160,
      +  "minLength": 8,
      +  "type": "string"
      +}
    • addedInput schema / properties / markdown
      Added value: +{
      +  "description": "Simple semantic content. Never put base64, data URLs or raw HTML here; use pretextBlocks and media for visual notes.",
      +  "maxLength": 5000000,
      +  "type": "string"
      +}
    • addedInput schema / properties / media
      Added value: +{
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "align": {
      +        "enum": [
      +          "left",
      +          "right",
      +          "center",
      +          "none",
      +          "free"
      +        ],
      +        "type": "string"
      +      },
      +      "alt": {
      +        "maxLength": 500,
      +        "type": "string"
      +      },
      +      "anchor": {
      +        "description": "Character offset in note text, or page anchor index when anchorMode is page.",
      +        "maximum": 5000000,
      +        "minimum": 0,
      +        "type": "integer"
      +      },
      +      "anchorMode": {
      +        "description": "Anchor the editable Pretext medium to text flow or to the page.",
      +        "enum": [
      +          "text",
      +          "page"
      +        ],
      +        "type": "string"
      +      },
      +      "dyLines": {
      +        "description": "Vertical offset from the anchor measured in text lines.",
      +        "maximum": 1000,
      +        "minimum": -1000,
      +        "type": "number"
      +      },
      +      "fileId": {
      +        "description": "The id returned by upload_file. Do not provide a URL or base64 payload.",
      +        "maxLength": 160,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "hiddenUntilClick": {
      +        "type": "boolean"
      +      },
      +      "kind": {
      +        "enum": [
      +          "image",
      +          "audio",
      +          "video",
      +          "file"
      +        ],
      +        "type": "string"
      +      },
      +      "rotation": {
      +        "maximum": 180,
      +        "minimum": -180,
      +        "type": "number"
      +      },
      +      "widthFrac": {
      +        "description": "Media width as a fraction of content width. Required with anchor.",
      +        "maximum": 1,
      +        "minimum": 0.05,
      +        "type": "number"
      +      },
      +      "xFrac": {
      +        "description": "Horizontal position as a fraction of content width.",
      +        "maximum": 1,
      +        "minimum": 0,
      +        "type": "number"
      +      }
      +    },
      +    "required": [
      +      "fileId",
      +      "kind"
      +    ],
      +    "type": "object"
      +  },
      +  "maxItems": 50,
      +  "type": "array"
      +}
    • addedInput schema / properties / noteId
      Added value: +{
      +  "maxLength": 160,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedInput schema / properties / parentNoteId
      Added value: +{
      +  "anyOf": [
      +    {
      +      "$ref": "#/properties/noteId"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • addedInput schema / properties / pretextBlocks
      Added value: +{
      +  "description": "Native visual Pretext blocks. Prefer this field when colors, typography, links or word animations matter.",
      +  "items": {
      +    "anyOf": [
      +      {
      +        "additionalProperties": false,
      +        "properties": {
      +          "align": {
      +            "enum": [
      +              "left",
      +              "center",
      +              "right",
      +              "justify"
      +            ],
      +            "type": "string"
      +          },
      +          "lineHeight": {
      +            "maximum": 3,
      +            "minimum": 1,
      +            "type": "number"
      +          },
      +          "runs": {
      +            "items": {
      +              "additionalProperties": false,
      +              "properties": {
      +                "animation": {
      +                  "description": "Native durable Pretext word animation.",
      +                  "enum": [
      +                    "wave",
      +                    "pulse",
      +                    "rainbow",
      +                    "bounce",
      +                    "float",
      +                    "shake",
      +                    "swing",
      +                    "spin",
      +                    "typewriter",
      +                    "sparkle",
      +                    "gradient"
      +                  ],
      +                  "type": "string"
      +                },
      +                "backgroundColor": {
      +                  "$ref": "#/properties/pretextBlocks/items/anyOf/0/properties/runs/items/properties/textColor",
      +                  "description": "Highlight color as #RRGGBB."
      +                },
      +                "bold": {
      +                  "description": "Render this run with native Pretext bold styling.",
      +                  "type": "boolean"
      +                },
      +                "fontFamily": {
      +                  "description": "A font available in the NotePom Pretext renderer.",
      +                  "enum": [
      +                    "inherit",
      +                    "literata",
      +                    "atkinson"
      +                  ],
      +                  "type": "string"
      +                },
      +                "fontSize": {
      +                  "description": "Font size in CSS pixels.",
      +                  "maximum": 96,
      +                  "minimum": 8,
      +                  "type": "number"
      +                },
      +                "href": {
      +                  "description": "Safe HTTP(S) or mailto link for this run.",
      +                  "format": "uri",
      +                  "maxLength": 2000,
      +                  "type": "string"
      +                },
      +                "italic": {
      +                  "description": "Render this run with native Pretext italic styling.",
      +                  "type": "boolean"
      +                },
      +                "letterSpacing": {
      +                  "description": "Letter spacing in em.",
      +                  "maximum": 0.3,
      +                  "minimum": -0.05,
      +                  "type": "number"
      +                },
      +                "text": {
      +                  "description": "Literal text for this visual run. Raw HTML is escaped.",
      +                  "maxLength": 100000,
      +                  "type": "string"
      +                },
      +                "textColor": {
      +                  "description": "Text color as #RRGGBB.",
      +                  "pattern": "^#[0-9a-fA-F]{6}$",
      +                  "type": "string"
      +                }
      +              },
      +              "required": [
      +                "text"
      +              ],
      +              "type": "object"
      +            },
      +            "maxItems": 200,
      +            "minItems": 1,
      +            "type": "array"
      +          },
      +          "type": {
      +            "const": "paragraph",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "type",
      +          "runs"
      +        ],
      +        "type": "object"
      +      },
      +      {
      +        "additionalProperties": false,
      +        "properties": {
      +          "align": {
      +            "enum": [
      +              "left",
      +              "center",
      +              "right"
      +            ],
      +            "type": "string"
      +          },
      +          "level": {
      +            "enum": [
      +              1,
      +              2,
      +              3
      +            ],
      +            "type": "number"
      +          },
      +          "runs": {
      +            "$ref": "#/properties/pretextBlocks/items/anyOf/0/properties/runs"
      +          },
      +          "type": {
      +            "const": "heading",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "type",
      +          "level",
      +          "runs"
      +        ],
      +        "type": "object"
      +      },
      +      {
      +        "additionalProperties": false,
      +        "properties": {
      +          "items": {
      +            "items": {
      +              "$ref": "#/properties/pretextBlocks/items/anyOf/0/properties/runs"
      +            },
      +            "maxItems": 100,
      +            "minItems": 1,
      +            "type": "array"
      +          },
      +          "type": {
      +            "const": "bulletList",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "type",
      +          "items"
      +        ],
      +        "type": "object"
      +      }
      +    ]
      +  },
      +  "maxItems": 500,
      +  "type": "array"
      +}
    • addedInput schema / properties / title
      Added value: +{
      +  "maxLength": 300,
      +  "type": "string"
      +}
    • addedInput schema / required
      Added value: +[
      +  "title",
      +  "idempotencyKey"
      +]
  3. Changed12 schema fields changed
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • removedInput schema / additionalProperties
      Removed value: -false
    • removedInput schema / properties / contentMode
      Removed value: -{
      -  "enum": [
      -    "replace",
      -    "append",
      -    "prepend"
      -  ],
      -  "type": "string"
      -}
    • removedInput schema / properties / expectedUpdatedAt
      Removed value: -{
      -  "format": "date-time",
      -  "type": "string"
      -}
    • removedInput schema / properties / folderId
      Removed value: -{
      -  "$ref": "#/properties/noteId"
      -}
    • removedInput schema / properties / idempotencyKey
      Removed value: -{
      -  "maxLength": 160,
      -  "minLength": 8,
      -  "type": "string"
      -}
    • removedInput schema / properties / markdown
      Removed value: -{
      -  "maxLength": 5000000,
      -  "type": "string"
      -}
    • removedInput schema / properties / media
      Removed value: -{
      -  "items": {
      -    "additionalProperties": false,
      -    "properties": {
      -      "alt": {
      -        "maxLength": 500,
      -        "type": "string"
      -      },
      -      "fileId": {
      -        "$ref": "#/properties/noteId"
      -      },
      -      "kind": {
      -        "enum": [
      -          "image",
      -          "audio",
      -          "video",
      -          "file"
      -        ],
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "fileId",
      -      "kind"
      -    ],
      -    "type": "object"
      -  },
      -  "maxItems": 50,
      -  "type": "array"
      -}
    • removedInput schema / properties / noteId
      Removed value: -{
      -  "maxLength": 160,
      -  "minLength": 1,
      -  "type": "string"
      -}
    • removedInput schema / properties / parentNoteId
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "$ref": "#/properties/noteId"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ]
      -}
    • removedInput schema / properties / title
      Removed value: -{
      -  "maxLength": 300,
      -  "type": "string"
      -}
    • removedInput schema / required
      Removed value: -[
      -  "title",
      -  "markdown",
      -  "idempotencyKey"
      -]
  4. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare idempotent=true, destructive=false, and readOnly=false, so the safety profile is covered; the description adds non-obvious behavior such as the upload_file dependency, media rejecting bytes/URLs/base64, and the folderId-omitted default to workspace root. It still omits update-conflict semantics for expectedUpdatedAt and whether contentMode replace discards existing content.

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?

Five sentences, front-loaded with the core verb and resource, then progressively narrower guidance about content fields, media prerequisites and folder placement. Dense but each sentence carries distinct operational information; a couple could be tightened.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/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 values need not be described, and annotations cover the safety profile. For a 10-parameter mutation tool with 20% schema coverage, the description leaves too many parameters (idempotencyKey, expectedUpdatedAt, contentMode, noteId) unexplained for an agent to call it confidently.

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 only 20% across 10 parameters, so the description must carry weight, and it does explain markdown, pretextBlocks, media/fileId and folderId. However it is silent on title, noteId, idempotencyKey, expectedUpdatedAt, parentNoteId and, most importantly, contentMode's replace/append/prepend effect on an upsert.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening sentence names a specific verb pair (create or update) and resource (a real Pretext note), which is enough for an agent to distinguish it from read-side siblings like get_note. It does not explicitly contrast itself with update_collaboration_note or explain the create-vs-update trigger (noteId presence), so it falls short of a 5.

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?

The description gives concrete routing guidance: markdown for simple content, pretextBlocks for colors/typography/links/animations, and a hard prerequisite to call upload_file before populating media. It stops short of stating when NOT to use this tool or how it relates to the collaboration-note siblings.

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