Add pagination support to get_comments

- Add page parameter to get_comments (default: 1)
- Parse X-Total-Count header for total comments count
- Parse Link header for next_page indicator
- Update FastMCP tool and CLI server to return pagination metadata

Response now includes total_count and next_page fields to help
clients navigate through paginated comments.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Mammad M.
2026-01-10 00:33:00 +01:00
parent 6265026f57
commit 67d68af1da
4 changed files with 55 additions and 19 deletions

View File

@@ -467,7 +467,8 @@ class BasecampSearch:
try:
# If both recording_id and bucket_id are provided, get comments for that specific recording
if recording_id and bucket_id:
comments = self.client.get_comments(recording_id, bucket_id)
result = self.client.get_comments(recording_id, bucket_id)
comments = result["comments"]
# Otherwise we can't search across all comments as there's no endpoint for that
else:
logger.warning("Cannot search all comments across Basecamp - both recording_id and bucket_id are required")