mdast-query
Parse Markdown into MDAST and query or modify nodes with CSS-style selectors, supporting select, insert, update, remove, and replace operations on text, files, URLs, or existing MDAST.
Instructions
Parse Markdown to MDAST and perform query/manipulation operations with CSS-style selectors. Supports select/insert/update/remove/replace operations. Input: text/file/url/mdast, Output: text/file/mdast
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": {
"operation": "<operation>"
},
"name": "mdast-query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| index | No | Index specification for multiple matches (0-based) | |
| output | No | Output destination specification | |
| content | No | Content to insert/update (Markdown format) | |
| markdown | No | Input specification | |
| position | No | Position specification for insertion | |
| selector | No | CSS-style selector (e.g., 'heading[depth="1"]', 'paragraph > strong') | |
| operation | Yes | Operation type to perform |