command_execute
Execute an Obsidian command by ID
How to use it
command_execute is exposed by the Obsidian Local Rest Api MCP server. Add the server to your MCP client (Claude Desktop, Cursor, Windsurf and others), and the command_execute tool becomes available to the model automatically. See the full listing for setup details and every tool this server provides.
Install Obsidian Local Rest Api
npm install --save-dev obsidian-local-rest-apiOther tools in Obsidian Local Rest Api (15)
Return the vault path of the file currently open in Obsidian
List all registered Obsidian commands
Open a file in the Obsidian UI
Search using a JsonLogic query against note metadata
Full-text search using Obsidian's built-in search
List all tags across the vault with usage counts
Append content to the end of a vault file
Copy a vault file to a new path
Delete a vault file (moves to trash by default)
List the headings, block references, and frontmatter fields in a file
List files and subdirectories inside a vault directory
Move (rename) a vault file to a new path
Patch a specific heading, block reference, or frontmatter field
Read a file's content, frontmatter, tags, and stat
Create or overwrite a vault file