obsidian_run_command
Execute Obsidian commands by ID to trigger actions like toggling folds or invoking plugins. Use with command IDs from the command palette list for direct control.
Instructions
Run a command from Obsidian's command palette by ID.
Effects depend entirely on the command — some only change the view, others modify notes or invoke other plugins. Check obsidian_list_commands for valid IDs and prefer a specific tool when one exists.
Args: params (RunCommandInput): - command_id (str): ID from obsidian_list_commands
Returns: str: JSON {"status": "ok", "action": "executed", "command_id": str, "backend": "rest"} On failure: "Error: "
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"params": "<params>"
},
"name": "obsidian_run_command"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |