obsidian_open_uri
Construct an obsidian://open URI for a note using its vault-relative path, enabling direct links to open notes.
Instructions
Build an obsidian://open URI for a note. This does not execute OS commands.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| vault | No | Optional configured vault name. Defaults to the server default vault. | |
| path | Yes | Vault-relative path. Absolute paths and traversal are rejected. |
Implementation Reference
- src/tools.ts:1295-1305 (handler)Handler for obsidian_open_uri tool: builds an obsidian://open URI string for a given vault note path. Does not execute the URI (it just constructs it).
tool( "obsidian_open_uri", "Build an obsidian://open URI for a note. This does not execute OS commands.", { vault: vaultArg, path: pathArg }, (args) => { const vault = vaults.getVault(args.vault); const file = encodeURIComponent(vaults.notePath(args.path)); return { uri: `obsidian://open?vault=${encodeURIComponent(vault.name)}&file=${file}` }; }, { readOnlyHint: true }, );