Skip to content

Merge test to main - #174

Merged
sweetmantech merged 1 commit into
mainfrom
test
Jan 29, 2026
Merged

Merge test to main#174
sweetmantech merged 1 commit into
mainfrom
test

Conversation

@sweetmantech

@sweetmantechsweetmantech commented Jan 29, 2026

Copy link
Copy Markdown
Contributor

Merge test branch into main after PR #173

Summary by CodeRabbit

  • New Features

    • Added a chat retrieval tool with optional filtering by account and artist identifiers.
  • Tests

    • Comprehensive test suite covering authentication, access control, error handling, and data validation for the chat tool.

✏️ Tip: You can customize this high-level summary in your review settings.

Adds a new MCP tool that mirrors the /api/chats endpoint functionality:
- Reuses buildGetChatsParams for authorization logic
- Reuses selectRooms for database queries
- Supports account_id and artist_account_id filters
- Follows same auth patterns as get_pulses tool
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
@vercel

vercelBot commented Jan 29, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

ProjectDeploymentReviewUpdated (UTC)
recoup-apiBuildingBuildingPreviewJan 29, 2026 4:26pm

@sweetmantech
sweetmantech merged commit f249a2e into mainJan 29, 2026
4 of 6 checks passed
@coderabbitai

coderabbitaiBot commented Jan 29, 2026

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

This PR introduces a new "get_chats" MCP tool that retrieves authenticated user chat rooms with optional filtering by account_id and artist_account_id. The implementation includes a complete tool registration module, integration into the central tool registry, and comprehensive unit tests covering authentication, parameter validation, data retrieval, and error scenarios.

Changes

Cohort / File(s)Summary
Chat Tool Implementation
lib/mcp/tools/chats/registerGetChatsTool.ts, lib/mcp/tools/chats/index.ts
Introduces new MCP tool "get_chats" that validates authentication, builds query parameters, retrieves chat rooms via selectRooms, and returns results or error responses. Exports registerGetChatsTool and GetChatsArgs type; aggregates registration via registerAllChatsTools.
Chat Tool Tests
lib/mcp/tools/chats/__tests__/registerGetChatsTool.test.ts
Comprehensive test suite covering tool registration, empty/populated results, account_id overrides with access validation, authentication requirements, org-member and admin behaviors, artist_account_id filtering, query parameter construction, and error handling for missing auth or invalid retrieval responses.
Tool Registry Integration
lib/mcp/tools/index.ts
Imports and invokes registerAllChatsTools within registerAllTools to register the new chat tool alongside existing tool groups.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 A whisker-full of chats takes flight,
With hopping auth checks, all done right,
Filter by artist, account, or name,
Our get_chats tool joins the MCP game!

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

github-actionsBot commented Jan 29, 2026

Copy link
Copy Markdown

Braintrust eval report

Catalog Opportunity Analysis Evaluation (HEAD-1769704032)

ScoreAverageImprovementsRegressions
Catalog_availability0% (-2pp)-1 🔴
Llm_calls0 (+0)--
Tool_calls0 (+0)--
Errors0 (+0)--
Llm_errors0 (+0)--
Tool_errors0 (+0)--
Prompt_tokens0tok (+0tok)--
Prompt_cached_tokens0tok (+0tok)--
Prompt_cache_creation_tokens0tok (+0tok)--
Completion_tokens0tok (+0tok)--
Completion_reasoning_tokens0tok (+0tok)--
Total_tokens0tok (+0tok)--
Duration45.12s (+2.82s)2 🟢3 🔴

Catalog Songs Count Evaluation (HEAD-1769704032)

ScoreAverageImprovementsRegressions
AnswerCorrectness19.5% (+0pp)1 🟢2 🔴
Factuality66.7% (+0pp)--
Llm_calls4 (+0)--
Tool_calls0 (+0)--
Errors0 (+0)--
Llm_errors0 (+0)--
Tool_errors0 (+0)--
Prompt_tokens0tok (+0tok)--
Prompt_cached_tokens0tok (+0tok)--
Prompt_cache_creation_tokens0tok (+0tok)--
Completion_tokens0tok (+0tok)--
Completion_reasoning_tokens0tok (+0tok)--
Completion_accepted_prediction_tokens0tok (+0tok)--
Completion_rejected_prediction_tokens0tok (+0tok)--
Completion_audio_tokens0tok (+0tok)--
Total_tokens0tok (+0tok)--
Duration23.11s (+6.09s)2 🟢1 🔴

First Week Album Sales Evaluation (HEAD-1769704032)

ScoreAverageImprovementsRegressions
Factuality55% (+20pp)2 🟢-
Llm_calls1 (+0)--
Tool_calls0 (+0)--
Errors0 (+0)--
Llm_errors0 (+0)--
Tool_errors0 (+0)--
Prompt_tokens0tok (+0tok)--
Prompt_cached_tokens0tok (+0tok)--
Prompt_cache_creation_tokens0tok (+0tok)--
Completion_tokens0tok (+0tok)--
Completion_reasoning_tokens0tok (+0tok)--
Completion_accepted_prediction_tokens0tok (+0tok)--
Completion_rejected_prediction_tokens0tok (+0tok)--
Completion_audio_tokens0tok (+0tok)--
Total_tokens0tok (+0tok)--
Duration16.63s (+1.42s)1 🟢3 🔴

Memory & Storage Tools Evaluation (HEAD-1769704032)

ScoreAverageImprovementsRegressions
Tools_called0% (+0pp)--
Llm_calls0 (+0)--
Tool_calls0 (+0)--
Errors0 (+0)--
Llm_errors0 (+0)--
Tool_errors0 (+0)--
Prompt_tokens0tok (+0tok)--
Prompt_cached_tokens0tok (+0tok)--
Prompt_cache_creation_tokens0tok (+0tok)--
Completion_tokens0tok (+0tok)--
Completion_reasoning_tokens0tok (+0tok)--
Total_tokens0tok (+0tok)--
Duration32.97s (+13.63s)-1 🔴

Monthly Listeners Tracking Evaluation (HEAD-1769704032)

ScoreAverageImprovementsRegressions
AnswerSimilarity76.5% (-2pp)2 🟢3 🔴
Llm_calls2 (+0)--
Tool_calls0 (+0)--
Errors0 (+0)--
Llm_errors0 (+0)--
Tool_errors0 (+0)--
Prompt_tokens0tok (+0tok)--
Prompt_cached_tokens0tok (+0tok)--
Prompt_cache_creation_tokens0tok (+0tok)--
Completion_tokens0tok (+0tok)--
Completion_reasoning_tokens0tok (+0tok)--
Total_tokens0tok (+0tok)--
Duration14.33s (+0.68s)3 🟢2 🔴

Search Web Tool Evaluation (HEAD-1769704032)

ScoreAverageImprovementsRegressions
AnswerCorrectness31.4% (+5pp)9 🟢2 🔴
Llm_calls3 (+0)--
Tool_calls0 (+0)--
Errors0 (+0)--
Llm_errors0 (+0)--
Tool_errors0 (+0)--
Prompt_tokens0tok (+0tok)--
Prompt_cached_tokens0tok (+0tok)--
Prompt_cache_creation_tokens0tok (+0tok)--
Completion_tokens0tok (+0tok)--
Completion_reasoning_tokens0tok (+0tok)--
Completion_accepted_prediction_tokens0tok (+0tok)--
Completion_rejected_prediction_tokens0tok (+0tok)--
Completion_audio_tokens0tok (+0tok)--
Total_tokens0tok (+0tok)--
Duration37.37s (+12.99s)4 🟢7 🔴

Social Scraping Evaluation (HEAD-1769704032)

ScoreAverageImprovementsRegressions
Tools_called0% (+0pp)--
Llm_calls0 (+0)--
Tool_calls0 (+0)--
Errors0 (+0)--
Llm_errors0 (+0)--
Tool_errors0 (+0)--
Prompt_tokens0tok (+0tok)--
Prompt_cached_tokens0tok (+0tok)--
Prompt_cache_creation_tokens0tok (+0tok)--
Completion_tokens0tok (+0tok)--
Completion_reasoning_tokens0tok (+0tok)--
Total_tokens0tok (+0tok)--
Duration21.83s (+0.36s)3 🟢3 🔴

Spotify Followers Evaluation (HEAD-1769704032)

ScoreAverageImprovementsRegressions
AnswerCorrectness20.4% (0pp)2 🟢3 🔴
Llm_calls3 (+0)--
Tool_calls0 (+0)--
Errors0 (+0)--
Llm_errors0 (+0)--
Tool_errors0 (+0)--
Prompt_tokens0tok (+0tok)--
Prompt_cached_tokens0tok (+0tok)--
Prompt_cache_creation_tokens0tok (+0tok)--
Completion_tokens0tok (+0tok)--
Completion_reasoning_tokens0tok (+0tok)--
Completion_accepted_prediction_tokens0tok (+0tok)--
Completion_rejected_prediction_tokens0tok (+0tok)--
Completion_audio_tokens0tok (+0tok)--
Total_tokens0tok (+0tok)--
Duration14.48s (-1.01s)3 🟢2 🔴

Spotify Tools Evaluation (HEAD-1769704032)

ScoreAverageImprovementsRegressions
Tools_called0% (+0pp)--
Llm_calls0 (+0)--
Tool_calls0 (+0)--
Errors0 (+0)--
Llm_errors0 (+0)--
Tool_errors0 (+0)--
Prompt_tokens0tok (+0tok)--
Prompt_cached_tokens0tok (+0tok)--
Prompt_cache_creation_tokens0tok (+0tok)--
Completion_tokens0tok (+0tok)--
Completion_reasoning_tokens0tok (+0tok)--
Total_tokens0tok (+0tok)--
Duration35.65s (+3.67s)1 🟢1 🔴

TikTok Analytics Questions Evaluation (HEAD-1769704032)

ScoreAverageImprovementsRegressions
Question_answered0% (+0pp)--
Llm_calls0 (+0)--
Tool_calls0 (+0)--
Errors0 (+0)--
Llm_errors0 (+0)--
Tool_errors0 (+0)--
Prompt_tokens0tok (+0tok)--
Prompt_cached_tokens0tok (+0tok)--
Prompt_cache_creation_tokens0tok (+0tok)--
Completion_tokens0tok (+0tok)--
Completion_reasoning_tokens0tok (+0tok)--
Total_tokens0tok (+0tok)--
Duration16.62s (-4.22s)2 🟢-

Sign up for freeto 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.

1 participant

@sweetmantech