Skip to main content
Glama
MCP MDAST Server

MCP MDAST Server

by mako10k

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

NameRequiredDescriptionDefault
indexNoIndex specification for multiple matches (0-based)
outputNoOutput destination specification
contentNoContent to insert/update (Markdown format)
markdownNoInput specification
positionNoPosition specification for insertion
selectorNoCSS-style selector (e.g., 'heading[depth="1"]', 'paragraph > strong')
operationYesOperation type to perform

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.2

TDQS

B3.4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations supplied, the description carries the full behavioral burden. It discloses the mutation surface (insert/update/remove/replace), which is valuable, and the I/O surface, but it says nothing about the destructive nature of remove, file-system or permission constraints (the schema alone mentions paths are confined to the home directory), or what a select actually returns.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short sentences, front-loaded with the core capability, with no redundant explanation. The telegraphic 'Input:/Output:' fragment is efficient but partially duplicates schema enums, keeping it just short of a 5.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a seven-parameter tool with nested input/output objects, five operations, and no output schema or annotations, the description covers the I/O modes and operation set but leaves select's result shape undefined. It also omits how selector, position, and index combine, which matters for a manipulation tool of this complexity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so every property, including the two enums and the nested input/output objects, is already documented in the schema. The closing 'Input: text/file/url/mdast, Output: text/file/mdast' line restates enum values rather than adding new meaning about how source, selector, position, or index interact. Baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

It states a specific verb and resource ('Parse Markdown to MDAST') plus the query/manipulation capability with CSS-style selectors, and enumerates the supported operations. What it does not do is distinguish itself from the siblings mdast-analyze and mdast-transform, so a reader can still wonder which of the three to pick.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The list of operations (select/insert/update/remove/replace) implicitly tells the reader what tasks the tool can serve, and the Input/Output line signals supported sources. There is no explicit when-to-use or when-not-to-use statement, and no mention of when to prefer mdast-analyze or mdast-transform instead.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools