Documentation
¶
Overview ¶
Package climcp provides functions to convert urfave/cli commands into MCP (Model Context Protocol) tools using the official MCP Go SDK.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddCommandTool ¶
AddCommandTool is a convenience function that converts a cli.Command into an MCP tool and registers it on the given server with the command's own Action as the handler.
func CommandToTool ¶
CommandToTool converts a cli.Command into an mcp.Tool with an automatically derived JSON Schema for its input based on the command's flags.
The returned tool uses the command's Name as the tool name and its Usage (or Description) as the tool description.
func CommandToToolHandler ¶
func CommandToToolHandler(cmd *cli.Command) mcp.ToolHandler
CommandToToolHandler converts a cli.Command into an mcp.ToolHandler that, when invoked, constructs a synthetic CLI invocation from the MCP call arguments and runs the command's Action.
func CommandToToolHandlerWithResult ¶
func CommandToToolHandlerWithResult(cmd *cli.Command, action ActionHandlerFunc) mcp.ToolHandler
CommandToToolHandlerWithResult is like CommandToToolHandler but uses an ActionHandlerFunc that returns text output to be sent back via the MCP result.