obsidian_dom_query
Queries DOM elements in Obsidian UI by CSS selector to inspect UI state, returning first or all matches and extracting attributes or text.
Instructions
Query DOM elements in Obsidian UI. Useful for inspecting UI state.
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": {
"selector": "<selector>"
},
"name": "obsidian_dom_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| all | No | Return all matching elements (default: false, returns first match) | |
| selector | Yes | CSS selector to query | |
| attribute | No | Attribute to extract (default: innerHTML, use 'text' for textContent) |