Wren MCP

Tool reference

The server exposes 10 tools. Reads only look at the account; writes add or rename notes. Each section below shows the scope, parameters and a request you can send.

get_drawing_guide

Read-onlyNo sign-inidempotent

Returns every kind Wren can draw, the exact arguments for each with a working example, and the rules for writing into notes. Call it before the first drawing.

Parameters

No parameters.

Request

JSON-RPC body
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_drawing_guide",
    "arguments": {}
  }
}

connect_account

Read-onlyOAuthprofile.readidempotent

Links the user’s Wren account so authored notes land in their notebook. Returns the linked uid.

Parameters

No parameters.

Request

JSON-RPC body
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "connect_account",
    "arguments": {}
  }
}

get_profile

Read-onlyOAuthprofile.readidempotent

Returns the stable account id (Firebase uid) and basic profile of the linked account.

Parameters

No parameters.

Request

JSON-RPC body
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_profile",
    "arguments": {}
  }
}

list_notes

Read-onlyOAuthnotes.readidempotent

Lists notes, most recently edited first, with id, title, subject and page count.

Parameters

  • querystring (≤200)optional

    Case-insensitive match on title or subject.

  • limitinteger (1–50)optional

    Max notes to return. Default 20.

Request

JSON-RPC body
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "list_notes",
    "arguments": {
      "query": "quadratics",
      "limit": 5
    }
  }
}

get_note

Read-onlyOAuthnotes.readidempotent

Shows one note’s title, subject, page size and pages (number, id, stroke count, and whether Wren can add ink to the page).

Parameters

  • noteIdstring (1–200)required

    Note id, from list_notes or a previous Wren result.

Request

JSON-RPC body
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_note",
    "arguments": {
      "noteId": "<noteId from list_notes>"
    }
  }
}

render_note_preview

Read-onlyNo sign-in or OAuthnotes.writeidempotent

Renders an SVG preview of a stroke array, framed at the page size, as an inline widget.

Parameters

  • strokesarray (≥1)optional

    Strokes to preview. Omit to preview sample strokes.

  • pageWidth, pageHeightnumber (200–5000)optional

    Page size in points.

  • titlestring (≤200)optional

    Title shown on the preview.

  • openInNoteNestUrlurioptional

    Deep link to open the note on the iPad.

  • noteIdstring (≤200)optional

    Note the preview belongs to.

create_handwritten_note

WriteOAuthnotes.write

Creates a NEW note with one handwritten page (pressure-faithful PencilKit strokes) drawn from a figure. It syncs to the user’s iPad.

Parameters

  • figureobject { kind, content }in practice

    What to draw. kind is one of the 13 kinds; content holds that kind’s fields. A call with no figure (or legacy sourceSpec / graphSpec) is refused.

  • titlestring (1–200)optional

    Note title shown in the notebook.

  • subjectstring (≤120)optional

    Optional class or subject tag.

  • pageWidth, pageHeightnumber (200–5000)optional

    Page size in points. Default A4, 595 × 842.

  • prompt, kind, sourceSpec, graphSpeclegacyoptional

    Older ways to specify the drawing. Still accepted; prefer figure.

Request

JSON-RPC body
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "create_handwritten_note",
    "arguments": {
      "title": "Quadratics",
      "figure": {
        "kind": "graph_2d",
        "content": {
          "prompt": "y = x^2 - 4"
        }
      }
    }
  }
}

add_page

WriteOAuthnotes.write

Adds a NEW handwritten page at the end of an existing note. Returns which note and page the ink went to.

Parameters

  • noteIdstring (1–200)required

    Note id, from list_notes or a previous Wren result.

  • figureobject { kind, content }in practice

    What to draw. kind is one of the 13 kinds; content holds that kind’s fields. A call with no figure (or legacy sourceSpec / graphSpec) is refused.

  • prompt, kind, sourceSpec, graphSpeclegacyoptional

    Older ways to specify the drawing. Still accepted; prefer figure.

Request

JSON-RPC body
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "add_page",
    "arguments": {
      "noteId": "<noteId from list_notes>",
      "figure": {
        "kind": "formula",
        "content": {
          "latex": "x = \\frac{-b \\pm \\sqrt{b^2 - 4ac}}{2a}"
        }
      }
    }
  }
}

edit_page

WriteOAuthnotes.writedestructive

Writes onto an EXISTING page that Wren wrote. append keeps the page’s ink and adds below it; replace erases it first. Only pages get_note reports as editable can be changed; the user’s own handwriting is never modified.

Parameters

  • noteIdstring (1–200)required

    Note id, from list_notes or a previous Wren result.

  • pageNumberinteger (≥1)one of

    1-based page number.

  • pageIdstring (≤200)one of

    Page id from get_note. Wins over pageNumber.

  • mode"append" | "replace"optional

    Default append. Use replace only when the user asked to redo the page.

  • figureobject { kind, content }in practice

    What to draw. kind is one of the 13 kinds; content holds that kind’s fields. A call with no figure (or legacy sourceSpec / graphSpec) is refused.

  • prompt, kind, sourceSpec, graphSpeclegacyoptional

    Older ways to specify the drawing. Still accepted; prefer figure.

Request

JSON-RPC body
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "edit_page",
    "arguments": {
      "noteId": "<noteId from list_notes>",
      "pageNumber": 1,
      "mode": "append",
      "figure": {
        "kind": "annotation",
        "content": {
          "text": "The vertex is at (0, -4)."
        }
      }
    }
  }
}

update_note

WriteOAuthnotes.writedestructiveidempotent

Changes a note’s title and/or subject. Does not touch its pages.

Parameters

  • noteIdstring (1–200)required

    Note id, from list_notes or a previous Wren result.

  • titlestring (1–200)optional

    New title.

  • subjectstring (≤120)optional

    New subject. An empty string clears it.

Request

JSON-RPC body
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "update_note",
    "arguments": {
      "noteId": "<noteId from list_notes>",
      "title": "Quadratics (final)"
    }
  }
}

Drawing kinds

create_handwritten_note, add_page and edit_page take a figure of one of these 13 kinds. Call get_drawing_guide for each kind’s exact fields and a working example; it is the source of truth.

  • annotationHandwritten text

    content: { text } or { lines }

  • graph_2dFunction graph

    content: { prompt: "y = x^2 - 4" } or { xRange, yRange, curves }

  • formulaTypeset formula

    content: { latex } or { expr }

  • worked_solutionStep-by-step solution

    content: problem statement + ordered steps

  • study_pageStudy page

    content: title + ordered sections (paragraph or embedded figure)

  • checklistChecklist

    content: optional title + items

  • tableTable

    content: { headers, rows }

  • bar_chartBar chart

    content: { bars }

  • timelineTimeline

    content: { events }

  • flowchartFlowchart

    content: boxes and arrows

  • mindmapMind map

    content: central topic with branches

  • concept_mapConcept map

    content: concepts with labelled links

  • labelled_diagramLabelled diagram

    content: an outline with labelled parts

Rules that apply to writes

  • A drawing call needs a figure. A call with only prompt is refused with instructions.
  • For a graph, put the equation in figure.content.prompt (for example y = x^2 - 4). Do not send polynomial coefficients.
  • For handwritten text, figure.content.text holds only the words to write, with no instruction prefix.
  • edit_page only works on pages Wren wrote that the user has not changed; get_note reports which pages are editable. Use add_page otherwise.
  • Use mode: "replace" only when the user explicitly asked to replace or redo the page.

Authentication details are on the Authentication page.