Skip to main content
Glama
markdown.go1.08 kB
package parser import ( tree_sitter_markdown "github.com/tree-sitter-grammars/tree-sitter-markdown/bindings/go" tree_sitter "github.com/tree-sitter/go-tree-sitter" ) var MarkdownSpec = &LanguageSpec{ ExtractChildrenIn: []string{"section"}, SkipTypes: []string{ // Headings are organizational markers, not containers. "atx_heading", "setext_heading", // We're chunking by section so lower level nodes don't get their own chunks // since this would lead to a lot of noise as sections overlap. "block_quote", "block_continuation", "fenced_code_block", "indented_code_block", "html_block", "link_reference_definition", "list", "paragraph", "pipe_table", "thematic_break", }, FileTypeRules: []FileTypeRule{ {Pattern: "**/*.md", Type: FileTypeDocs}, }, } func NewMarkdownParser(workspaceRoot string) (*Parser, error) { parser := tree_sitter.NewParser() parser.SetLanguage(tree_sitter.NewLanguage(tree_sitter_markdown.Language())) return &Parser{ workspaceRoot: workspaceRoot, parser: parser, spec: MarkdownSpec, }, nil }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/st3v3nmw/sourcerer-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server