Skip to content
LydieDevelopers
Menu

MCP tools

Every tool the hosted MCP server lists.

View as Markdown

What tools/list returns on https://api.lydie.co/mcp. The local server in the desktop app lists the same tools. Use run_operation for anything not listed here; MCP server explains how to connect.

create_doc

Writesdocs:writeREST endpoint

Create a document. Creates a document in a workspace, optionally under a parent and with an initial Markdown body. Without afterId/beforeId it is appended as the last child.

  • workspaceIdstringrequired· 1–64 chars
  • idULID

    Client-minted id. Generated when omitted.

  • parentIdULIDor null

    Default null

  • titlestring· 1–255 chars

    Default "Untitled"

  • Default {}

  • markdownstring

    Initial body as Lydie Markdown.

  • teamspaceIdstringor null· 1–64 chars

    Hosted: the teamspace a top-level page goes into (null or absent: the creator's private section). Ignored for child pages, which share their parent's space, and in local mode.

  • Place directly after this sibling.

  • Place directly before this sibling.

  • sortKeystring· 1–256 chars

    Explicit fractional key. Overrides afterId/beforeId; recorded by clients so replays converge.

rename_doc

Writesdocs:writeREST endpoint

Rename a document.

  • idULIDrequired
  • titlestringrequired· 1–255 chars

move_doc

Writesdocs:writeREST endpoint

Move a document. Moves a document (and its subtree) under a new parent, or to the top level with parentId null. Without afterId/beforeId it becomes the last child.

  • idULIDrequired
  • parentIdULIDor nullrequired
  • Place directly after this sibling.

  • Place directly before this sibling.

  • sortKeystring· 1–256 chars

    Explicit fractional key. Overrides afterId/beforeId; recorded by clients so replays converge.

delete_doc

Destructivedocs:writeREST endpoint

Delete a document. Soft-deletes a document and its subtree. Restore it with doc.restore. Deleting a deleted document is a no-op.

  • idULIDrequired

restore_doc

Writesdocs:writeREST endpoint

Restore a deleted document. Restores a soft-deleted document and the part of its subtree deleted with it. If its parent is gone it is restored to the top level.

  • idULIDrequired

purge_doc

Destructivedocs:writeREST endpoint

Permanently delete a document. Permanently deletes a document in the trash, its trashed subtree, bodies and outgoing links. Links to it become unresolved. Cannot be undone.

  • idULIDrequired

set_doc_properties

Writesdocs:writeREST endpoint

Set document properties. Merges set into the document's properties and removes the keys in unset.

  • idULIDrequired
  • setobject

    Default {}

  • unsetstring[]

    Default []

update_doc

Writesdocs:writeREST endpoint

Update a document body. Replaces the body with markdown, or applies edits (exact old/new string replacements against the Markdown returned by doc.get). Edits that do not match exactly once are skipped and reported in warnings. Pass expectedVersion to fail with a conflict if the body changed since you read it.

fetch_doc

Read-onlydocs:readREST endpoint

Get a document. Returns a document's metadata and, unless includeBody is false, its Markdown body.

list_docs

Read-onlydocs:readREST endpoint

List the document tree. Lists documents depth-first in tree order. With rootId, lists that document's descendants only.

list_children

Read-onlydocs:readREST endpoint

List a document's children. Lists the direct children of a document (or the top level when parentId is omitted) in order, each with its number of live children. Use it to load a tree level by level.

Read-onlydocs:readREST endpoint

Search documents. Full-text search over titles and bodies. Words are matched as prefixes; all words must match.

  • workspaceIdstringrequired· 1–64 chars
  • querystringrequired· 1–500 chars
  • limitinteger· 1–50

    Default 20

Read-onlydocs:readREST endpoint

List backlinks. Lists live documents that link to this document.

  • idULIDrequired
Read-onlydocs:readREST endpoint

List backlinks to a block. Lists live documents that link to one block ([[Note#^blockId]]) of this document.

Read-onlydocs:readREST endpoint

List outgoing links. Lists the links in this document (body first, then properties, in document order), each with the live document it resolves to or null.

  • idULIDrequired

list_unlinked_mentions

Read-onlydocs:readREST endpoint

List unlinked mentions. Lists live documents whose text mentions this document's title without linking to it.

  • idULIDrequired
  • limitinteger· 1–100

    Default 50

Read-onlydocs:readREST endpoint

List unresolved links. Lists links in live documents whose target does not exist (yet).

list_trash

Read-onlydocs:readREST endpoint

List the trash. Lists what is in a workspace's trash, newest first. A document deleted with its subtree is one item; restoring it restores the subtree.

empty_trash

Destructivedocs:writeREST endpoint

Empty the trash. Permanently deletes everything in a workspace's trash. Cannot be undone.

create_attachment

Writesdocs:writeREST endpoint

Add an attachment. Records an attachment whose bytes are already stored under their SHA-256 (the Blob port locally, an upload URL when hosted). Several attachments may share the same bytes.

delete_attachment

Destructivedocs:writeREST endpoint

Delete an attachment. Moves an attachment to the trash. Restore it with attachment.restore.

  • idULIDrequired

restore_attachment

Writesdocs:writeREST endpoint

Restore an attachment.

  • idULIDrequired

purge_attachment

Destructivedocs:writeREST endpoint

Permanently delete an attachment. Permanently deletes an attachment in the trash. Its bytes are removed when no other attachment uses them. Cannot be undone.

  • idULIDrequired

get_attachment

Read-onlydocs:readREST endpoint

Get an attachment.

  • idULIDrequired

list_attachments

Read-onlydocs:readREST endpoint

List attachments. Lists a workspace's attachments, or one document's, newest first.

list_sessions

Read-onlydocs:readREST endpoint

List agent sessions. Lists sessions that changed a workspace, most recent first.

list_session_changes

Read-onlydocs:readREST endpoint

List a session's changes. Lists every operation a session applied, oldest first.

  • sessionIdstringrequired· ≥ 1 chars
  • limitinteger· 1–1000

    Default 200

undo_session

Writesdocs:writeREST endpoint

Undo a session. Reverts every change a session made, newest first, as one undoable step. Changes that later edits by others touched are skipped and reported, as are changes that cannot be undone.

create_database

Writesdocs:writeREST endpoint

Create a database. Creates a database: a document whose children are its rows. With documentId, turns an existing document into a database (its children become rows). Starts with a title property and one view.

  • workspaceIdstringrequired· 1–64 chars
  • idULID

    Client-minted id of the new database document.

  • Turn this existing document into a database.

  • parentIdULIDor null

    Default null

  • titlestring· 1–255 chars

    Default "Untitled database"

  • teamspaceIdstringor null· 1–64 chars

    Hosted: the teamspace a new top-level database goes into (null or absent: the creator's private section). Ignored with parentId or documentId, and in local mode.

  • Place directly after this sibling.

  • Place directly before this sibling.

  • sortKeystring· 1–256 chars

    Explicit fractional key (recorded so replays converge).

  • viewTypestring

    One oftableboardlistcalendargallery

    Default "table"

  • viewIdULID

get_database

Read-onlydocs:readREST endpoint

Get a database. Returns a database's settings, live properties and views, in order.

  • idULIDrequired

list_databases

Read-onlydocs:readREST endpoint

List databases. Lists the live databases of a workspace (database documents not in the trash).

query_database

Read-onlydocs:readREST endpoint

Query a database. Returns one window of a view's rows (filtered, sorted, grouped), with the total and group counts. Pass viewId for a saved view, or view for an ad-hoc one (both: view overrides). uniqueId values are numbers (shown as prefix-number, e.g. LYD-12); filters take 12 or "LYD-12".

write_database_rows

Destructivedocs:writeREST endpoint

Write database rows. Creates, updates and deletes rows in one step. A row without id is created; with id it is updated (title renames it); delete: true moves it to the trash. values are keyed by property id, frontmatter key or name; relation values are row ids; select values are option names (new names become options); uniqueId values are numbers (pass 12 or "LYD-12"; new rows get the next number). unset clears properties.

  • databaseIdULIDrequired
  • rowsobject[]required· 1–1000 items
    Show 5 fields
    • idULID

      An existing row to update or delete.

    • titlestring· 1–255 chars
    • valuesobject

      Default {}

    • unsetstring[]

      Default []

    • deleteboolean

      Default false

change_database_schema

Destructivedocs:writeREST endpoint

Change a database's properties. Adds, changes and removes properties in one step. update can rename (name), change the type (values are converted), the frontmatter key or the config (options, relation, number format, formula expression). Removed properties keep their values in the rows.

  • databaseIdULIDrequired
  • addobject[]

    Default []

    Show 4 fields
    • namestringrequired· 1–200 chars
    • typestringrequired

      One oftitletextnumberselectmultiSelectstatusdatecheckboxurlemailphonepersonfilesrelationrollupformulauniqueIdcreatedTimeupdatedTimecreatedByupdatedBy

    • keystring· 1–128 chars
    • configPropertyConfigSpecInput
      Show 11 fields
      • optionsobject[]

        select, multiSelect, status

        Show 4 fields
        • idULID
        • namestringrequired· 1–200 chars
        • colorstring

          One ofdefaultgraybrownorangeyellowgreenbluepurplepinkred

          Default "default"

        • groupstring

          One oftodoinProgresscomplete

      • One ofnumberintegercommaspercentcurrency

      • decimalsinteger· 0–10
      • currencystring· 3–3 chars

        ISO 4217 code, with numberFormat currency

      • date: values carry a time

      • rangeboolean

        date: values may carry an end (start/end)

      • relationRelationConfigInput
        Show 4 fields
        • databaseIdULIDrequired

          The database whose rows this relation points at.

        • twoWayboolean

          Default false

        • The synced property on the other database (two-way relations).

          Default null

        • limitstring

          One ofonemany

          Default "many"

      • rollupRollupConfigInput
        Show 3 fields
        • relationPropertyIdULIDrequired
        • targetPropertyIdULIDrequired

          A property of the related database.

        • functionstringrequired

          One ofshowOriginalshowUniquecountcountValuescountUniquecountEmptycountNotEmptypercentEmptypercentNotEmptysumaveragemedianminmaxrangeearliestlatestcheckeduncheckedpercentCheckedpercentUnchecked

      • formula: an Obsidian Bases expression

      • prefixstring· ≤ 16 chars

        uniqueId: shown before the number ("LYD" → LYD-12)

      • extraobject
  • updateobject[]

    Default []

    Show 5 fields
    • propertystringrequired· ≥ 1 chars

      A property's id, frontmatter key or name (case-insensitive).

    • namestring· 1–200 chars
    • typestring

      One oftitletextnumberselectmultiSelectstatusdatecheckboxurlemailphonepersonfilesrelationrollupformulauniqueIdcreatedTimeupdatedTimecreatedByupdatedBy

    • keystring· 1–128 chars
    • configPropertyConfigSpecInput
      Show 11 fields
      • optionsobject[]

        select, multiSelect, status

        Show 4 fields
        • idULID
        • namestringrequired· 1–200 chars
        • colorstring

          One ofdefaultgraybrownorangeyellowgreenbluepurplepinkred

          Default "default"

        • groupstring

          One oftodoinProgresscomplete

      • One ofnumberintegercommaspercentcurrency

      • decimalsinteger· 0–10
      • currencystring· 3–3 chars

        ISO 4217 code, with numberFormat currency

      • date: values carry a time

      • rangeboolean

        date: values may carry an end (start/end)

      • relationRelationConfigInput
        Show 4 fields
        • databaseIdULIDrequired

          The database whose rows this relation points at.

        • twoWayboolean

          Default false

        • The synced property on the other database (two-way relations).

          Default null

        • limitstring

          One ofonemany

          Default "many"

      • rollupRollupConfigInput
        Show 3 fields
        • relationPropertyIdULIDrequired
        • targetPropertyIdULIDrequired

          A property of the related database.

        • functionstringrequired

          One ofshowOriginalshowUniquecountcountValuescountUniquecountEmptycountNotEmptypercentEmptypercentNotEmptysumaveragemedianminmaxrangeearliestlatestcheckeduncheckedpercentCheckedpercentUnchecked

      • formula: an Obsidian Bases expression

      • prefixstring· ≤ 16 chars

        uniqueId: shown before the number ("LYD" → LYD-12)

      • extraobject
  • removestring[]

    Default []

change_database_views

Destructivedocs:writeREST endpoint

Change a database's views. Adds, changes and removes views in one step. config is merged into the view's config (filter, sorts, groupBy, columns, …); see get_database for the current values.

run_operation

Destructive

Runs any Lydie operation by id with its input, including these not listed as tools: database.update: Update database settings; database.delete: Turn a database back into a page; database.restore: Restore a database; database.setDefinition: Replace a database's schema and views; database.listTemplates: List row templates; database.addProperty: Add a database property; database.renameProperty: Rename a database property; database.updateProperty: Update a database property; database.changePropertyType: Change a property's type; database.moveProperty: Reorder a database property; database.deleteProperty: Delete a database property; database.restoreProperty: Restore a database property; database.addOption: Add a select option; database.updateOption: Rename or recolour a select option; database.moveOption: Reorder a select option; database.deleteOption: Delete a select option; database.createView: Create a database view; database.renameView: Rename a database view; database.duplicateView: Duplicate a database view; database.moveView: Reorder a database view; database.updateView: Update a database view; database.deleteView: Delete a database view; database.restoreView: Restore a database view; database.createRow: Create a database row; database.setValues: Set row values; database.moveRow: Move a database row; database.duplicateRows: Duplicate database rows; database.deleteRows: Delete database rows; database.restoreRows: Restore database rows. Get an operation's input schema with describe_operation.

  • operationstringrequired

    Operation id, e.g. doc.move.

    One ofdoc.createdoc.renamedoc.movedoc.deletedoc.restoredoc.purgedoc.setPropertiesdoc.updateBodydoc.getdoc.listTreedoc.listChildrendoc.searchdoc.backlinksdoc.blockBacklinksdoc.outgoingLinksdoc.unlinkedMentionsdoc.unresolvedLinkstrash.listtrash.emptyattachment.createattachment.deleteattachment.restoreattachment.purgeattachment.getattachment.listhistory.listSessionshistory.listBySessionhistory.undoSessiondatabase.createdatabase.updatedatabase.deletedatabase.restoredatabase.setDefinitiondatabase.getdatabase.listTemplatesdatabase.listdatabase.querydatabase.addPropertydatabase.renamePropertydatabase.updatePropertydatabase.changePropertyTypedatabase.movePropertydatabase.deletePropertydatabase.restorePropertydatabase.addOptiondatabase.updateOptiondatabase.moveOptiondatabase.deleteOptiondatabase.createViewdatabase.renameViewdatabase.duplicateViewdatabase.moveViewdatabase.updateViewdatabase.deleteViewdatabase.restoreViewdatabase.createRowdatabase.setValuesdatabase.moveRowdatabase.duplicateRowsdatabase.deleteRowsdatabase.restoreRowsdatabase.writeRowsdatabase.changeSchemadatabase.changeViews

  • inputobjectrequired

    The operation's input.

describe_operation

Read-only

Returns an operation's description and input and output JSON Schemas, for run_operation.

  • operationstringrequired

    Operation id, e.g. doc.move.

    One ofdoc.createdoc.renamedoc.movedoc.deletedoc.restoredoc.purgedoc.setPropertiesdoc.updateBodydoc.getdoc.listTreedoc.listChildrendoc.searchdoc.backlinksdoc.blockBacklinksdoc.outgoingLinksdoc.unlinkedMentionsdoc.unresolvedLinkstrash.listtrash.emptyattachment.createattachment.deleteattachment.restoreattachment.purgeattachment.getattachment.listhistory.listSessionshistory.listBySessionhistory.undoSessiondatabase.createdatabase.updatedatabase.deletedatabase.restoredatabase.setDefinitiondatabase.getdatabase.listTemplatesdatabase.listdatabase.querydatabase.addPropertydatabase.renamePropertydatabase.updatePropertydatabase.changePropertyTypedatabase.movePropertydatabase.deletePropertydatabase.restorePropertydatabase.addOptiondatabase.updateOptiondatabase.moveOptiondatabase.deleteOptiondatabase.createViewdatabase.renameViewdatabase.duplicateViewdatabase.moveViewdatabase.updateViewdatabase.deleteViewdatabase.restoreViewdatabase.createRowdatabase.setValuesdatabase.moveRowdatabase.duplicateRowsdatabase.deleteRowsdatabase.restoreRowsdatabase.writeRowsdatabase.changeSchemadatabase.changeViews