Repository navigation
feat(operations,mcp): document scaffolding pre-conditions in deploy-service / grant-repo-access - #45
Merged
Merged
Conversation
…ervice / grant-repo-access LLM consumers of the MCP server (and humans reading the REST operation list) keep tripping on the implicit assumption that an onboarded repo already has a Dockerfile and a CI deploy job. When they don't, mctl_deploy_service action=onboard fails with a generic build error and the user has to re-discover the canonical layout each time. Surface the pre-conditions directly in the tool descriptions, with links to the new https://docs.mctl.ai/guides/scaffolding page that ships copy-paste Dockerfile templates (Node, Python, Go, static) and the canonical SemVer-bumping CI deploy job. Three edits, no behaviour change: - internal/operations/registry.go (deploy-service): extend the short Description seen by REST GET /api/v1/operations callers. - internal/mcp/server.go (mctl_deploy_service): expand the MCP tool description with a Pre-conditions block, the four-step onboard order-of-operations, and the same docs link. - internal/mcp/server.go (mctl_grant_repo_access): append a paragraph pointing at scaffolding for first-time service setup, since grant_repo_access is the typical entry point.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This was referenced Sep 9, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Surface the implicit pre-conditions of
mctl_deploy_service action=onboarddirectly in tool descriptions, instead of letting LLM/human consumers re-discover them via failed builds. Three text-only edits, no behaviour change:internal/operations/registry.go(deploy-service Description): extend the short summary returned byGET /api/v1/operationsto mention the Dockerfile requirement and link to the scaffolding guide.internal/mcp/server.go(mctl_deploy_service): expand the MCP description with a Pre-conditions block, a four-step Order of operations for a brand-new repo, and the same docs link.internal/mcp/server.go(mctl_grant_repo_access): append a paragraph pointing at scaffolding for first-time service setup —grant_repo_accessis the natural entry point and the right place to flag what's coming next.Why
Every fresh-service onboard currently re-discovers the same layout: Dockerfile shape, CI deploy job calling
api.mctl.ai/api/v1/operations/deploy-service/execute, and theMCTL_GITHUB_TOKENsecret backing it. With these enriched descriptions, an LLM session readingmctl_deploy_servicealready knows the procedure (and where to find the templates) before it tries to call onboard against an empty repo.Pairs with mctlhq/mctl-docs#15 (the
/guides/scaffoldingpage that this PR links to). Merge that one first so the link resolves on docs.mctl.ai before this lands.Test plan
go build ./...passes (verified locally before pushing)curl https://api.mctl.ai/api/v1/operationsreturns the newdeploy-serviceDescription textmctl_deploy_servicetool definition shows the new pre-conditions block🤖 Generated with Claude Code