AptlyStar

Obsidian

Interact with your Obsidian vault via the Local REST API

使用方法

Read, create, update, search, and delete notes in your Obsidian vault. Manage periodic notes, execute commands, and patch content at specific locations. Requires the Obsidian Local REST API plugin.

ツール

obsidian_append_active

Append content to the currently active file in Obsidian

入力

パラメータ型必須説明
apiKeystringはいAPI key from Obsidian Local REST API plugin settings
baseUrlstringはいBase URL for the Obsidian Local REST API
contentstringはいMarkdown content to append to the active file

出力

パラメータ型説明
appendedbooleanWhether content was successfully appended

obsidian_append_note

Append content to an existing note in your Obsidian vault

入力

パラメータ型必須説明
apiKeystringはいAPI key from Obsidian Local REST API plugin settings
baseUrlstringはいBase URL for the Obsidian Local REST API
filenamestringはいPath to the note relative to vault root (e.g. "folder/note.md")
contentstringはいMarkdown content to append to the note

出力

パラメータ型説明
filenamestringPath of the note
appendedbooleanWhether content was successfully appended

obsidian_append_periodic_note

Append content to the current periodic note (daily, weekly, monthly, quarterly, or yearly). Creates the note if it does not exist.

入力

パラメータ型必須説明
apiKeystringはいAPI key from Obsidian Local REST API plugin settings
baseUrlstringはいBase URL for the Obsidian Local REST API
periodstringはいPeriod type: daily, weekly, monthly, quarterly, or yearly
contentstringはいMarkdown content to append to the periodic note

出力

パラメータ型説明
periodstringPeriod type of the note
appendedbooleanWhether content was successfully appended

obsidian_create_note

Create or replace a note in your Obsidian vault

入力

パラメータ型必須説明
apiKeystringはいAPI key from Obsidian Local REST API plugin settings
baseUrlstringはいBase URL for the Obsidian Local REST API
filenamestringはいPath for the note relative to vault root (e.g. "folder/note.md")
contentstringはいMarkdown content for the note

出力

パラメータ型説明
filenamestringPath of the created note
createdbooleanWhether the note was successfully created

obsidian_delete_note

Delete a note from your Obsidian vault

入力

パラメータ型必須説明
apiKeystringはいAPI key from Obsidian Local REST API plugin settings
baseUrlstringはいBase URL for the Obsidian Local REST API
filenamestringはいPath to the note to delete relative to vault root

出力

パラメータ型説明
filenamestringPath of the deleted note
deletedbooleanWhether the note was successfully deleted

obsidian_execute_command

Execute a command in Obsidian (e.g. open daily note, toggle sidebar)

入力

パラメータ型必須説明
apiKeystringはいAPI key from Obsidian Local REST API plugin settings
baseUrlstringはいBase URL for the Obsidian Local REST API
commandIdstringはいID of the command to execute (use List Commands operation to discover available commands)

出力

パラメータ型説明
commandIdstringID of the executed command
executedbooleanWhether the command was successfully executed

obsidian_get_active

Retrieve the content of the currently active file in Obsidian

入力

パラメータ型必須説明
apiKeystringはいAPI key from Obsidian Local REST API plugin settings
baseUrlstringはいBase URL for the Obsidian Local REST API

出力

パラメータ型説明
contentstringMarkdown content of the active file
filenamestringPath to the active file

obsidian_get_note

Retrieve the content of a note from your Obsidian vault

入力

パラメータ型必須説明
apiKeystringはいAPI key from Obsidian Local REST API plugin settings
baseUrlstringはいBase URL for the Obsidian Local REST API
filenamestringはいPath to the note relative to vault root (e.g. "folder/note.md")

出力

パラメータ型説明
contentstringMarkdown content of the note
filenamestringPath to the note

obsidian_get_periodic_note

Retrieve the current periodic note (daily, weekly, monthly, quarterly, or yearly)

入力

パラメータ型必須説明
apiKeystringはいAPI key from Obsidian Local REST API plugin settings
baseUrlstringはいBase URL for the Obsidian Local REST API
periodstringはいPeriod type: daily, weekly, monthly, quarterly, or yearly

出力

パラメータ型説明
contentstringMarkdown content of the periodic note
periodstringPeriod type of the note

obsidian_list_commands

List all available commands in Obsidian

入力

パラメータ型必須説明
apiKeystringはいAPI key from Obsidian Local REST API plugin settings
baseUrlstringはいBase URL for the Obsidian Local REST API

出力

パラメータ型説明
commandsjsonList of available commands with IDs and names
↳ idstringCommand identifier
↳ namestringHuman-readable command name

obsidian_list_files

List files and directories in your Obsidian vault

入力

パラメータ型必須説明
apiKeystringはいAPI key from Obsidian Local REST API plugin settings
baseUrlstringはいBase URL for the Obsidian Local REST API
pathstringいいえDirectory path relative to vault root. Leave empty to list root.

出力

パラメータ型説明
filesjsonList of files and directories
↳ pathstringFile or directory path
↳ typestringWhether the entry is a file or directory

obsidian_open_file

Open a file in the Obsidian UI (creates the file if it does not exist)

入力

パラメータ型必須説明
apiKeystringはいAPI key from Obsidian Local REST API plugin settings
baseUrlstringはいBase URL for the Obsidian Local REST API
filenamestringはいPath to the file relative to vault root
newLeafbooleanいいえWhether to open the file in a new leaf/tab

出力

パラメータ型説明
filenamestringPath of the opened file
openedbooleanWhether the file was successfully opened

obsidian_patch_active

Insert or replace content at a specific heading, block reference, or frontmatter field in the active file

入力

パラメータ型必須説明
apiKeystringはいAPI key from Obsidian Local REST API plugin settings
baseUrlstringはいBase URL for the Obsidian Local REST API
contentstringはいContent to insert at the target location
operationstringはいHow to insert content: append, prepend, or replace
targetTypestringはいType of target: heading, block, or frontmatter
targetstringはいTarget identifier (heading text, block reference ID, or frontmatter field name)
targetDelimiterstringいいえDelimiter for nested headings (default: "::")
trimTargetWhitespacebooleanいいえWhether to trim whitespace from target before matching (default: false)

出力

パラメータ型説明
patchedbooleanWhether the active file was successfully patched

obsidian_patch_note

Insert or replace content at a specific heading, block reference, or frontmatter field in a note

入力

パラメータ型必須説明
apiKeystringはいAPI key from Obsidian Local REST API plugin settings
baseUrlstringはいBase URL for the Obsidian Local REST API
filenamestringはいPath to the note relative to vault root (e.g. "folder/note.md")
contentstringはいContent to insert at the target location
operationstringはいHow to insert content: append, prepend, or replace
targetTypestringはいType of target: heading, block, or frontmatter
targetstringはいTarget identifier (heading text, block reference ID, or frontmatter field name)
targetDelimiterstringいいえDelimiter for nested headings (default: "::")
trimTargetWhitespacebooleanいいえWhether to trim whitespace from target before matching (default: false)

出力

パラメータ型説明
filenamestringPath of the patched note
patchedbooleanWhether the note was successfully patched

Search for text across notes in your Obsidian vault

入力

パラメータ型必須説明
apiKeystringはいAPI key from Obsidian Local REST API plugin settings
baseUrlstringはいBase URL for the Obsidian Local REST API
querystringはいText to search for across vault notes
contextLengthnumberいいえNumber of characters of context around each match (default: 100)

出力

パラメータ型説明
resultsjsonSearch results with filenames, scores, and matching contexts
↳ filenamestringPath to the matching note
↳ scorenumberRelevance score
↳ matchesjsonMatching text contexts
↳ contextstringText surrounding the match

On this page