Execute Obsidian Command
commands.executeExecute an Obsidian command by its internal ID via the Local REST API. Verify the command ID before calling, as effects depend on the command and can be destructive.
Instructions
Execute an Obsidian command by its internal id (as returned by commands.list). args is an optional argument map passed to the command (most built-in commands take no arguments). Requires the Local REST API plugin. Destructive — the effect depends entirely on what the command does, so verify the command id before calling.
Targets the vault the live Obsidian process has open via the Local REST API. Not affected by vault.select — that only changes filesystem-tool routing.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| commandId | Yes | Command identifier, e.g. `editor:save-file` or `command-palette:open`. | |
| args | No | Optional map of command arguments. Most commands accept none. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||