refactor: rename tools to verb-first convention (ARCH-387)#56
refactor: rename tools to verb-first convention (ARCH-387)#56
Conversation
- onboarding_list_memberships -> list_membership_actions - lfx_lens_query -> query_lfx_lens Update Register functions, type names, titles, defaultTools slice, and enabledTools guards to match. 🤖 Generated with [GitHub Copilot](https://github.com/features/copilot) (via OpenCode) Signed-off-by: Eric Searcy <eric@linuxfoundation.org>
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.
Tip: disable this comment in your organization's Code Review settings.
There was a problem hiding this comment.
Pull request overview
This PR renames two MCP tools to follow the repo’s verb-first naming convention, updating the server registration and default enabled tool list accordingly.
Changes:
- Renamed onboarding tool
onboarding_list_memberships→list_membership_actions(including registration function/type/handler names and title). - Renamed Lens tool
lfx_lens_query→query_lfx_lens(including registration function and title). - Updated
defaultToolsand tool enablement guards in the server to use the new tool names.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| internal/tools/onboarding.go | Renames onboarding tool registration/args/handler and updates dry-run messaging to new tool name. |
| internal/tools/lens.go | Renames Lens tool registration function/name/title to verb-first convention. |
| cmd/lfx-mcp-server/main.go | Updates default tool list and enabled-tool registration switches to new tool names. |
Comments suppressed due to low confidence (1)
internal/tools/onboarding.go:58
- This list-style tool currently authorizes with RelationWriter. In internal/tools/service.go, RelationWriter is documented as required for tools that mutate project resources, while read-only/analytics tools use RelationAuditor (e.g., Lens). If this tool is read-only, using RelationAuditor here would better match the intended permission model and avoid unnecessarily requiring writer access.
if onboardingConfig == nil {
return nil, nil, fmt.Errorf("onboarding tools not configured")
}
ctx, err := onboardingConfig.AuthorizeProject(ctx, req, args.ProjectSlug, RelationWriter)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ReadOnlyHint: true, | ||
| }, | ||
| }, WriteScopes(), handleOnboardingListMemberships) | ||
| }, WriteScopes(), handleListMembershipActions) |
There was a problem hiding this comment.
This tool is marked read-only (ReadOnlyHint: true) but is gated behind WriteScopes() (manage:all). That will reject callers who only have read:all. Switch the required scopes to ReadScopes() or, if manage access is intentional, set ReadOnlyHint to false and update the tool’s description/title accordingly.
| }, WriteScopes(), handleListMembershipActions) | |
| }, ReadScopes(), handleListMembershipActions) |
| Name: "list_membership_actions", | ||
| Description: "List memberships for a project with per-agent action and todo counts. Use search_projects first to find the project slug.", | ||
| Annotations: &mcp.ToolAnnotations{ |
There was a problem hiding this comment.
The tool is now named list_membership_actions, but the user-facing Description still says “List memberships…”, and the dummy response payload uses the key "memberships". Since the rename is meant to avoid “memberships” being misleading, consider updating these user-facing strings/fields to align with “membership actions” terminology.
|
Closing in favor of #57 |
Summary
Renames two MCP tools that had domain-prefix-before-verb naming, aligning them with the verb-first convention used by all other tools and by the GitHub MCP server.
onboarding_list_memberships→list_membership_actions(domain prefix before verb; "memberships" was also misleading — this tool returns per-member onboarding action items/checklist data, not a membership directory)lfx_lens_query→query_lfx_lens(domain prefix before verb)All other tools (
search_*,get_*,create_*,update_*,delete_*,list_*) were already verb-first and are unchanged.Register functions, type names, titles,
defaultToolsslice, andenabledToolsguards are all updated to match.Jira
ARCH-387
🤖 Generated with GitHub Copilot (via OpenCode)