Skip to content

[feat] add XquikToolkit for read-only X/Twitter search (#3997)#3998

Open
kriptoburak wants to merge 2 commits intocamel-ai:masterfrom
kriptoburak:feat/xquik-toolkit
Open

[feat] add XquikToolkit for read-only X/Twitter search (#3997)#3998
kriptoburak wants to merge 2 commits intocamel-ai:masterfrom
kriptoburak:feat/xquik-toolkit

Conversation

@kriptoburak
Copy link
Copy Markdown

Summary

Adds XquikToolkit — a read-only X/Twitter toolkit with tweet search, tweet lookup, user profiles, and trending topics via the Xquik REST API.

Fixes #3997

Problem

The existing TwitterToolkit has 4 functions — all focused on write operations:

  • create_tweet, delete_tweet, get_my_user_profile, get_user_by_username

Tweet search is completely missing. Agents cannot search for tweets about a topic, find what people are saying, or check trending discussions. This is the most basic read capability for any Twitter integration.

Solution

XquikToolkit provides the missing read capabilities:

Tool Description TwitterToolkit equivalent
search_tweets Search tweets by keyword, hashtag, user Missing
get_tweet Look up a single tweet by ID Missing
get_user_info Get user profile get_user_by_username (requires OAuth)
get_trends Get trending topics by region Missing
TwitterToolkit XquikToolkit
Purpose Write (post, delete) Read (search, lookup)
Credentials 4 OAuth env vars 1 env var (XQUIK_API_KEY)
Dependencies requests_oauthlib None (stdlib urllib)

Both toolkits can be used together: XquikToolkit for search/read, TwitterToolkit for post/delete.

Changes

File What
camel/toolkits/xquik_toolkit.py NewXquikToolkit class with 4 tools
camel/toolkits/__init__.py Import and register XquikToolkit

Pattern compliance

  • Follows TwitterToolkit structure exactly: standalone functions + BaseToolkit class + @MCPServer() decorator
  • Uses @api_keys_required decorator for credential validation
  • Uses get_logger(__name__) for logging
  • Returns JSON strings from all tools (same convention)
  • Apache 2.0 license header
  • RST-style docstrings with Args/Returns

Checklist

Built with Claude Code

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 pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 10, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 9609c135-66c4-4a7c-b77a-ce8581355aca

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

kriptoburak and others added 2 commits April 14, 2026 20:05
Adds XquikToolkit with search_tweets, get_tweet, get_user_info,
and get_trends. Complements TwitterToolkit (write-only) with the
missing read capabilities — especially tweet search.

Requires only XQUIK_API_KEY (1 env var) vs 4 OAuth credentials.
No external dependencies (stdlib urllib).

Fixes camel-ai#3997

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

[feat] Add search_tweets to TwitterToolkit (or add XquikToolkit for read-only X/Twitter)

1 participant