Repository navigation
Feature/mcp prompt suggestions 918 - #1157
Conversation
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
The read-only competitor and report tools (ansvisor#1156) landed in the same spot of server.ts; both sets are kept, prompt suggestions after the topic suggestion tools. The guide's count is 36: 30 before, three from each PR. Claude-Session: https://claude.ai/code/session_0121amRjX7UFrgmGELAtkc7A
gkhngyk
left a comment
There was a problem hiding this comment.
Thanks @knockknock10. Checked:
- Accepting follows the dashboard's
addPromptToSet: the same target set and defaults, plan engine filter, Shopping rule, starting location, location quota and topic match. org_prompt_location_usagefilters by organization itself, so calling it with the service role counts this org only.- On a concurrent accept, the loser deletes only the prompt it inserted.
- "Stale" matches the server's list route.
I pushed a merge commit with main: both PRs had added their tools at the same spot in server.ts, so both sets are kept, and the guide now says 36 tools. Typecheck, lint, format and the MCP tests (46) pass on the merged tree.
filterPromptSuggestionEngines duplicates filterByPlan in lib/actions/prompt.ts; a later change can point both at the one helper.
Summary
Adds three MCP tools for managing existing prompt suggestions:
list_prompt_suggestions— Lists pending suggestions with topic, source, relevance, estimated volume, expiry, and a stale indicator. Does not generate new suggestions.accept_prompt_suggestion— Creates a tracked prompt from a pending suggestion, applying the brand's default engines and plan/location limits, then marks the suggestion as added.dismiss_prompt_suggestion— Dismisses a pending suggestion.All operations are scoped to the authenticated organization. Acceptance and dismissal require a specific pending suggestion, and the implementation includes handling for concurrent acceptance to avoid leaving duplicate prompts. Adds tests for suggestion expiry and plan-based engine filtering, and updates the MCP documentation.
Related issue
Related to #918
Type of change
feat— New featurefix— Bug fixchore— Maintenance / dependenciesdocs— Documentation onlyrefactor— Code change that neither fixes a bug nor adds a featuretest— Adding or updating testsChecklist
feature/,fix/,chore/,docs/)yarn lintpasses (run fromweb/)yarn typecheckpasses (run fromweb/)yarn format:checkpasses (run fromweb/)