Markdown — 18 Operations for AI Agents

Markdown is where teams keep what they know: READMEs, runbooks, ADRs, docs sites. act101 treats it as structure rather than prose, so agents can find the one section that matters without ingesting the whole document.

This page is the canonical reference an AI coding agent uses to refactor, query, and analyze Markdown code through the act MCP server. 18 operations available: 0 refactor, 18 query, 0 analysis. Each operation is callable from Claude Code, Cursor, Codex, OpenCode, or any MCP-compatible agent host. Click any operation for a stable anchor link suitable for citation.

18Query

Worked Markdown examples

act101 reads a Markdown document's ATX headings — any line starting with one or more # characters, from # through ###### — as its structural declarations: every heading surfaces in the skeleton as a module, named for the heading text with its leading # markers stripped. symbols reports the same headings as a flat list, each tagged unknown rather than module, since a heading doesn't correspond to any of act101's semantic symbol kinds. The unit of structure in this grammar is the heading itself, not the section it introduces: act101 does not track which paragraphs, list items, or nested subheadings fall under a given heading. Each example below is the verbatim output of the command shown, run against the file shown. Query outputs are pretty-printed with the timing block omitted.

Read a document's headings without their body text

postmortem.md is an incident postmortem with six headings spanning three levels, from the H1 title down to a single H4 subheading.

$ act query skeleton postmortem.md

Before

# Incident Postmortem: Order Service Outage

### Summary

The order service returned 5xx errors for 42 minutes after a database
failover left a stale connection pool in place.

### Timeline

- 14:02 UTC — primary database node failed health checks
- 14:03 UTC — automatic failover promoted the replica
- 14:44 UTC — connection pool refreshed, errors stopped

### Root Cause

The connection pool held references to the old primary's IP address and
did not retry DNS resolution after the failover completed.

#### Contributing Factors

The pool's TTL was set to 6 hours, far longer than the failover window.

### Action Items

1. Lower the connection pool TTL to 5 minutes
2. Add a health check that forces pool refresh on failover

Output

{
    "type": "Skeleton",
    "declarations": [
        {
            "kind": "module",
            "name": "Incident Postmortem: Order Service Outage",
            "range": {
                "start": {
                    "file": "postmortem.md",
                    "line": 1,
                    "column": 1,
                    "byte_offset": 0
                },
                "end": {
                    "file": "postmortem.md",
                    "line": 1,
                    "column": 44,
                    "byte_offset": 43
                }
            },
            "name_range": {
                "start": {
                    "file": "postmortem.md",
                    "line": 1,
                    "column": 2,
                    "byte_offset": 1
                },
                "end": {
                    "file": "postmortem.md",
                    "line": 1,
                    "column": 44,
                    "byte_offset": 43
                }
            }
        },
        {
            "kind": "module",
            "name": "Summary",
            "range": {
                "start": {
                    "file": "postmortem.md",
                    "line": 3,
                    "column": 1,
                    "byte_offset": 45
                },
                "end": {
                    "file": "postmortem.md",
                    "line": 3,
                    "column": 12,
                    "byte_offset": 56
                }
            },
            "name_range": {
                "start": {
                    "file": "postmortem.md",
                    "line": 3,
                    "column": 4,
                    "byte_offset": 48
                },
                "end": {
                    "file": "postmortem.md",
                    "line": 3,
                    "column": 12,
                    "byte_offset": 56
                }
            }
        },
        {
            "kind": "module",
            "name": "Timeline",
            "range": {
                "start": {
                    "file": "postmortem.md",
                    "line": 8,
                    "column": 1,
                    "byte_offset": 177
                },
                "end": {
                    "file": "postmortem.md",
                    "line": 8,
                    "column": 13,
                    "byte_offset": 189
                }
            },
            "name_range": {
                "start": {
                    "file": "postmortem.md",
                    "line": 8,
                    "column": 4,
                    "byte_offset": 180
                },
                "end": {
                    "file": "postmortem.md",
                    "line": 8,
                    "column": 13,
                    "byte_offset": 189
                }
            }
        },
        {
            "kind": "module",
            "name": "Root Cause",
            "range": {
                "start": {
                    "file": "postmortem.md",
                    "line": 14,
                    "column": 1,
                    "byte_offset": 365
                },
                "end": {
                    "file": "postmortem.md",
                    "line": 14,
                    "column": 15,
                    "byte_offset": 379
                }
            },
            "name_range": {
                "start": {
                    "file": "postmortem.md",
                    "line": 14,
                    "column": 4,
                    "byte_offset": 368
                },
                "end": {
                    "file": "postmortem.md",
                    "line": 14,
                    "column": 15,
                    "byte_offset": 379
                }
            }
        },
        {
            "kind": "module",
            "name": "Contributing Factors",
            "range": {
                "start": {
                    "file": "postmortem.md",
                    "line": 19,
                    "column": 1,
                    "byte_offset": 513
                },
                "end": {
                    "file": "postmortem.md",
                    "line": 19,
                    "column": 26,
                    "byte_offset": 538
                }
            },
            "name_range": {
                "start": {
                    "file": "postmortem.md",
                    "line": 19,
                    "column": 5,
                    "byte_offset": 517
                },
                "end": {
                    "file": "postmortem.md",
                    "line": 19,
                    "column": 26,
                    "byte_offset": 538
                }
            }
        },
        {
            "kind": "module",
            "name": "Action Items",
            "range": {
                "start": {
                    "file": "postmortem.md",
                    "line": 23,
                    "column": 1,
                    "byte_offset": 613
                },
                "end": {
                    "file": "postmortem.md",
                    "line": 23,
                    "column": 17,
                    "byte_offset": 629
                }
            },
            "name_range": {
                "start": {
                    "file": "postmortem.md",
                    "line": 23,
                    "column": 4,
                    "byte_offset": 616
                },
                "end": {
                    "file": "postmortem.md",
                    "line": 23,
                    "column": 17,
                    "byte_offset": 629
                }
            }
        }
    ]
}

The skeleton reports all six headings — including the H4 Contributing Factors nested under Root Cause — as module declarations at the same flat level; the timeline list and the numbered action items never appear.

List the same headings as a flat symbol table

The postmortem's headings run from the H1 title down through Summary, Timeline, Root Cause, Contributing Factors, and Action Items.

$ act query symbols postmortem.md

Before

# Incident Postmortem: Order Service Outage

### Summary

The order service returned 5xx errors for 42 minutes after a database
failover left a stale connection pool in place.

### Timeline

- 14:02 UTC — primary database node failed health checks
- 14:03 UTC — automatic failover promoted the replica
- 14:44 UTC — connection pool refreshed, errors stopped

### Root Cause

The connection pool held references to the old primary's IP address and
did not retry DNS resolution after the failover completed.

#### Contributing Factors

The pool's TTL was set to 6 hours, far longer than the failover window.

### Action Items

1. Lower the connection pool TTL to 5 minutes
2. Add a health check that forces pool refresh on failover

Output

{
    "type": "Symbols",
    "symbols": [
        {
            "name": " Incident Postmortem: Order Service Outage",
            "kind": "unknown",
            "range": {
                "start": {
                    "file": "postmortem.md",
                    "line": 1,
                    "column": 2,
                    "byte_offset": 1
                },
                "end": {
                    "file": "postmortem.md",
                    "line": 1,
                    "column": 44,
                    "byte_offset": 43
                }
            },
            "visibility": "unknown"
        },
        {
            "name": " Summary",
            "kind": "unknown",
            "range": {
                "start": {
                    "file": "postmortem.md",
                    "line": 3,
                    "column": 4,
                    "byte_offset": 48
                },
                "end": {
                    "file": "postmortem.md",
                    "line": 3,
                    "column": 12,
                    "byte_offset": 56
                }
            },
            "visibility": "unknown"
        },
        {
            "name": " Timeline",
            "kind": "unknown",
            "range": {
                "start": {
                    "file": "postmortem.md",
                    "line": 8,
                    "column": 4,
                    "byte_offset": 180
                },
                "end": {
                    "file": "postmortem.md",
                    "line": 8,
                    "column": 13,
                    "byte_offset": 189
                }
            },
            "visibility": "unknown"
        },
        {
            "name": " Root Cause",
            "kind": "unknown",
            "range": {
                "start": {
                    "file": "postmortem.md",
                    "line": 14,
                    "column": 4,
                    "byte_offset": 368
                },
                "end": {
                    "file": "postmortem.md",
                    "line": 14,
                    "column": 15,
                    "byte_offset": 379
                }
            },
            "visibility": "unknown"
        },
        {
            "name": " Contributing Factors",
            "kind": "unknown",
            "range": {
                "start": {
                    "file": "postmortem.md",
                    "line": 19,
                    "column": 5,
                    "byte_offset": 517
                },
                "end": {
                    "file": "postmortem.md",
                    "line": 19,
                    "column": 26,
                    "byte_offset": 538
                }
            },
            "visibility": "unknown"
        },
        {
            "name": " Action Items",
            "kind": "unknown",
            "range": {
                "start": {
                    "file": "postmortem.md",
                    "line": 23,
                    "column": 4,
                    "byte_offset": 616
                },
                "end": {
                    "file": "postmortem.md",
                    "line": 23,
                    "column": 17,
                    "byte_offset": 629
                }
            },
            "visibility": "unknown"
        }
    ]
}

symbols lists the same six headings without distinguishing their heading level; each comes back as an unknown-kind entry rather than the skeleton's module.

Query

18 query tools, the same on every supported language. Descriptions live in the shared reference: /docs/query-tools.

callers control_flow data_flow definition diagnostics effect_closure effect_summary fix_auto get_type graph import_organize interface mutations references repo_outline skeleton symbols symbols_batch

← MakeMATLAB →