2626
2727 build :
2828 desc : Build all binaries
29- deps : [build:registry-builder, build:import-tool]
29+ deps : [build:registry-builder, build:import-tool, build:update-tools ]
3030
3131 build:registry-builder :
3232 desc : Build the registry-builder tool
@@ -56,6 +56,20 @@ tasks:
5656 generates :
5757 - " {{.BUILD_DIR}}/import-from-toolhive"
5858
59+ build:update-tools :
60+ desc : Build the update-tools tool
61+ cmds :
62+ - echo "🔨 Building update-tools..."
63+ - mkdir -p {{.BUILD_DIR}}
64+ - go build {{.LDFLAGS}} -o {{.BUILD_DIR}}/update-tools ./cmd/update-tools
65+ sources :
66+ - cmd/update-tools/**/*.go
67+ - pkg/**/*.go
68+ - go.mod
69+ - go.sum
70+ generates :
71+ - " {{.BUILD_DIR}}/update-tools"
72+
5973 import :
6074 desc : Import the existing ToolHive registry
6175 deps : [build:import-tool]
@@ -70,6 +84,52 @@ tasks:
7084 - echo "👀 Preview import (dry run)..."
7185 - ./{{.BUILD_DIR}}/import-from-toolhive --dry-run
7286
87+ update-tools :
88+ desc : Update tool lists for a specific MCP server spec file
89+ deps : [build:update-tools]
90+ cmds :
91+ - echo "🔧 Updating tools for {{.SPEC}}..."
92+ - ./{{.BUILD_DIR}}/update-tools {{.SPEC}} {{.CLI_ARGS}}
93+ vars :
94+ SPEC : ' {{.SPEC | default ""}}'
95+ preconditions :
96+ - sh : test -n "{{.SPEC}}"
97+ msg : " Please specify a spec file with SPEC=path/to/spec.yaml"
98+
99+ update-tools:dry-run :
100+ desc : Preview tool list updates for a specific MCP server spec file
101+ deps : [build:update-tools]
102+ cmds :
103+ - echo "👀 Preview tool updates for {{.SPEC}}..."
104+ - ./{{.BUILD_DIR}}/update-tools {{.SPEC}} --dry-run -v
105+ vars :
106+ SPEC : ' {{.SPEC | default ""}}'
107+ preconditions :
108+ - sh : test -n "{{.SPEC}}"
109+ msg : " Please specify a spec file with SPEC=path/to/spec.yaml"
110+
111+ update-tools:all :
112+ desc : Update tool lists for all MCP server spec files
113+ deps : [build:update-tools]
114+ cmds :
115+ - echo "🔧 Updating tools for all spec files..."
116+ - |
117+ find {{.REGISTRY_DIR}} -name "spec.yaml" -o -name "spec.yml" | while read spec; do
118+ echo "Processing $spec..."
119+ ./{{.BUILD_DIR}}/update-tools "$spec" -v || echo "Failed to update $spec"
120+ done
121+
122+ update-tools:all:dry-run :
123+ desc : Preview tool list updates for all MCP server spec files
124+ deps : [build:update-tools]
125+ cmds :
126+ - echo "👀 Preview tool updates for all spec files..."
127+ - |
128+ find {{.REGISTRY_DIR}} -name "spec.yaml" -o -name "spec.yml" | while read spec; do
129+ echo "Processing $spec..."
130+ ./{{.BUILD_DIR}}/update-tools "$spec" --dry-run -v || echo "Failed to process $spec"
131+ done
132+
73133 validate :
74134 desc : Validate all registry entries
75135 deps : [build:registry-builder]
0 commit comments