Skip to content

refactor: rename tools to verb-first convention (ARCH-387)#56

Closed
emsearcy wants to merge 1 commit intomainfrom
arch-387-verb-first-tool-names
Closed

refactor: rename tools to verb-first convention (ARCH-387)#56
emsearcy wants to merge 1 commit intomainfrom
arch-387-verb-first-tool-names

Conversation

@emsearcy
Copy link
Copy Markdown
Contributor

@emsearcy emsearcy commented Apr 8, 2026

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_membershipslist_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_queryquery_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, defaultTools slice, and enabledTools guards are all updated to match.

Jira

ARCH-387

🤖 Generated with GitHub Copilot (via OpenCode)

- 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>
Copilot AI review requested due to automatic review settings April 8, 2026 23:27
Copy link
Copy Markdown

@claude claude bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_membershipslist_membership_actions (including registration function/type/handler names and title).
  • Renamed Lens tool lfx_lens_queryquery_lfx_lens (including registration function and title).
  • Updated defaultTools and 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)
Copy link

Copilot AI Apr 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
}, WriteScopes(), handleListMembershipActions)
}, ReadScopes(), handleListMembershipActions)

Copilot uses AI. Check for mistakes.
Comment on lines +34 to 36
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{
Copy link

Copilot AI Apr 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
@emsearcy
Copy link
Copy Markdown
Contributor Author

emsearcy commented Apr 9, 2026

Closing in favor of #57

@emsearcy emsearcy closed this Apr 9, 2026
@emsearcy emsearcy deleted the arch-387-verb-first-tool-names branch April 14, 2026 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants