Skip to main content
Glama
emicklei

melrōse musical expression player

by emicklei
snippets.go849 B
package main // script to generate the snippets.json for melrose-for-vscode import ( "encoding/json" "github.com/emicklei/melrose/core" "os" "github.com/emicklei/melrose/dsl" ) // see Makefile how to run this type Snippet struct { Prefix string `json:"prefix"` Body []string `json:"body"` Description string `json:"description"` } func snippets() { snippets := map[string]Snippet{} ctx := core.PlayContext{ VariableStorage: dsl.NewVariableStore(), LoopControl: core.NoLooper, } for _, v := range dsl.EvalFunctions(ctx) { if len(v.Prefix) > 0 && len(v.Title) > 0 { snip := Snippet{ Prefix: v.Prefix, Body: []string{v.Template}, Description: v.Description, } snippets[v.Title] = snip } } enc := json.NewEncoder(os.Stdout) enc.SetIndent("", "\t") enc.Encode(snippets) }

Latest Blog Posts

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/emicklei/melrose'

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