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
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
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "get_drawing_guide",
"arguments": {}
}
}connect_account
Links the user’s Wren account so authored notes land in their notebook. Returns the linked uid.
Parameters
No parameters.
Request
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "connect_account",
"arguments": {}
}
}get_profile
Returns the stable account id (Firebase uid) and basic profile of the linked account.
Parameters
No parameters.
Request
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "get_profile",
"arguments": {}
}
}list_notes
Lists notes, most recently edited first, with id, title, subject and page count.
Parameters
querystring (≤200)optionalCase-insensitive match on title or subject.
limitinteger (1–50)optionalMax notes to return. Default 20.
Request
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "list_notes",
"arguments": {
"query": "quadratics",
"limit": 5
}
}
}get_note
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)requiredNote id, from list_notes or a previous Wren result.
Request
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "get_note",
"arguments": {
"noteId": "<noteId from list_notes>"
}
}
}render_note_preview
Renders an SVG preview of a stroke array, framed at the page size, as an inline widget.
Parameters
strokesarray (≥1)optionalStrokes to preview. Omit to preview sample strokes.
pageWidth, pageHeightnumber (200–5000)optionalPage size in points.
titlestring (≤200)optionalTitle shown on the preview.
openInNoteNestUrlurioptionalDeep link to open the note on the iPad.
noteIdstring (≤200)optionalNote the preview belongs to.
create_handwritten_note
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 practiceWhat 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)optionalNote title shown in the notebook.
subjectstring (≤120)optionalOptional class or subject tag.
pageWidth, pageHeightnumber (200–5000)optionalPage size in points. Default A4, 595 × 842.
prompt, kind, sourceSpec, graphSpeclegacyoptionalOlder ways to specify the drawing. Still accepted; prefer figure.
Request
{
"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
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)requiredNote id, from list_notes or a previous Wren result.
figureobject { kind, content }in practiceWhat 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, graphSpeclegacyoptionalOlder ways to specify the drawing. Still accepted; prefer figure.
Request
{
"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
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)requiredNote id, from list_notes or a previous Wren result.
pageNumberinteger (≥1)one of1-based page number.
pageIdstring (≤200)one ofPage id from get_note. Wins over pageNumber.
mode"append" | "replace"optionalDefault append. Use replace only when the user asked to redo the page.
figureobject { kind, content }in practiceWhat 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, graphSpeclegacyoptionalOlder ways to specify the drawing. Still accepted; prefer figure.
Request
{
"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
Changes a note’s title and/or subject. Does not touch its pages.
Parameters
noteIdstring (1–200)requiredNote id, from list_notes or a previous Wren result.
titlestring (1–200)optionalNew title.
subjectstring (≤120)optionalNew subject. An empty string clears it.
Request
{
"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 textcontent: { text } or { lines }
graph_2dFunction graphcontent: { prompt: "y = x^2 - 4" } or { xRange, yRange, curves }
formulaTypeset formulacontent: { latex } or { expr }
worked_solutionStep-by-step solutioncontent: problem statement + ordered steps
study_pageStudy pagecontent: title + ordered sections (paragraph or embedded figure)
checklistChecklistcontent: optional title + items
tableTablecontent: { headers, rows }
bar_chartBar chartcontent: { bars }
timelineTimelinecontent: { events }
flowchartFlowchartcontent: boxes and arrows
mindmapMind mapcontent: central topic with branches
concept_mapConcept mapcontent: concepts with labelled links
labelled_diagramLabelled diagramcontent: an outline with labelled parts
Rules that apply to writes
- A drawing call needs a
figure. A call with onlypromptis refused with instructions. - For a graph, put the equation in
figure.content.prompt(for exampley = x^2 - 4). Do not send polynomial coefficients. - For handwritten text,
figure.content.textholds only the words to write, with no instruction prefix. edit_pageonly works on pages Wren wrote that the user has not changed;get_notereports which pages are editable. Useadd_pageotherwise.- Use
mode: "replace"only when the user explicitly asked to replace or redo the page.
Authentication details are on the Authentication page.
