generated from wesen/wesen-go-template
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🎨 Start moving commands towards using layers and glazed
- Loading branch information
Showing
4 changed files
with
267 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package layers | ||
|
||
import ( | ||
"github.com/go-go-golems/glazed/pkg/cmds/layers" | ||
"github.com/go-go-golems/glazed/pkg/cmds/parameters" | ||
) | ||
|
||
type ClientSettings struct { | ||
Transport string `glazed.parameter:"transport"` | ||
Server string `glazed.parameter:"server"` | ||
Command []string `glazed.parameter:"command"` | ||
} | ||
|
||
const ClientLayerSlug = "mcp-client" | ||
|
||
func NewClientParameterLayer() (layers.ParameterLayer, error) { | ||
return layers.NewParameterLayer(ClientLayerSlug, "MCP Client Settings", | ||
layers.WithParameterDefinitions( | ||
parameters.NewParameterDefinition( | ||
"transport", | ||
parameters.ParameterTypeString, | ||
parameters.WithHelp("Transport type (command or sse)"), | ||
parameters.WithDefault("command"), | ||
), | ||
parameters.NewParameterDefinition( | ||
"server", | ||
parameters.ParameterTypeString, | ||
parameters.WithHelp("Server URL for SSE transport"), | ||
parameters.WithDefault("http://localhost:3001"), | ||
), | ||
parameters.NewParameterDefinition( | ||
"command", | ||
parameters.ParameterTypeStringList, | ||
parameters.WithHelp("Command and arguments for command transport"), | ||
parameters.WithDefault([]string{"mcp-server", "start", "--transport", "stdio"}), | ||
), | ||
), | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters