Evaluate JavaScript in Obsidian
obsidian_evalExecute JavaScript in Obsidian with full access to the app object. Use only when other tools cannot meet the need.
Instructions
Runs arbitrary JavaScript inside the running Obsidian instance with access to the app object. DANGEROUS: can read/modify any vault data and execute side effects. Use only when no narrower tool fits.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| vault | No | Vault name to target. Optional — defaults to the most recently focused vault. | |
| code | Yes | JavaScript code to evaluate. | |
| confirm | No | Set to true to skip the interactive confirmation prompt. Use only when the caller has already confirmed with the user. |