| name | go-mcp-tool |
| description | How to add a new MCP tool to mcp-unreal |
Adding a New Tool
- Create input/output types in the appropriate
internal/ package
- Implement the handler method on the package's Handler struct
- Register in
cmd/mcp-unreal/main.go with descriptive tool name + description
- Add tests with table-driven patterns
- Update README.md tool table
- Run
go test ./... && golangci-lint run
Template
type MyToolInput struct {
Param string `json:"param" jsonschema:"required,Description here"`
}
type MyToolOutput struct {
Result string `json:"result"`
}
func (h *Handler) MyTool(ctx context.Context, req *mcp.CallToolRequest, input MyToolInput) (*mcp.CallToolResult, MyToolOutput, error) {
}