fix: create_project_from_template hardcoded to template-go-web #24
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
create_project_from_templateis hardcoded to usetemplate-go-webas the template source incmd/gitea-mcp/main.go:The constructor already accepts
tmplOwnerandtmplNameas parameters — good design — but the template choice is baked into the binary at startup. There is no way to create an agent project (template-go-agent) without modifying the code.Required for
hyperguild new-projectneeds to select template at call time:go-web→template-go-webgo-agent→template-go-agentgo-ml,go-service, etc.Fix
Add a
template_nameparameter to the tool's input schema:The tool resolves the template owner from config (stays
mathias), but template name comes from the call argument. Default totemplate-go-webfor backwards compatibility.Alternatively: make
template_ownerandtemplate_nameboth configurable via env vars (TEMPLATE_OWNER,TEMPLATE_NAME) with the current hardcoded values as defaults, and the tool input schema overrides at call time.Recommended: input schema approach — more flexible, no restart needed to switch templates.
Acceptance criteria
create_project_from_templateaccepts optionaltemplate_nameparamtemplate-go-webif not specified (backwards compatible)template-go-agentworks when specified (requires that repo to have content first — see local-dev #5)main.gono longer hardcodes template nametemplate_name=template-go-agentRelated