PubNub MCP Server

カーソル IDE 用の PubNub モデル コンテキスト プロトコル (MCP) サーバー
このリポジトリは、PubNub SDKドキュメントとPubNub APIリソースをLLM対応ツールに公開するCLIベースのモデルコンテキストプロトコル(MCP)サーバーを提供します。これにより、LLM AIエージェントがPubNubのSDKとAPIを理解し、操作する能力が向上します。

特徴
STDIN/STDOUT 経由の JSON-RPC を介して PubNub と対話するためのツールを公開する MCP サーバー。
公式 PubNub SDK ドキュメント (HTML → Markdown) を取得します。
言語: JavaScript、Python、Java、Go、Ruby、Swift、Objective-C、C#、PHP、Rust、Unity、Kotlin、Unreal。
API リファレンス セクション: 構成、パブリッシュおよびサブスクライブ、プレゼンス、アクセス マネージャー、チャネル グループ、ストレージおよび再生、モバイル プッシュ、オブジェクト、ファイル、メッセージ アクション、その他、関数。
resourcesディレクトリ内のローカル マークダウン ファイルから PubNub の概念ガイドとハウツー ドキュメントを取得します (例:pubnub_concepts、pubnub_features、pubnub_security、how_to_send_receive_json、how_to_encrypt_messages_filesなど)。publish_pubnub_messageを使用して PubNub チャネルにメッセージを公開し、タイムトークンを返します。get_pubnub_messagesを使用して 1 つ以上のチャネルから履歴メッセージを取得し、メッセージの内容とメタデータを JSON 形式で返します。get_pubnub_presenceを使用して、チャネルおよびチャネル グループのリアルタイムのプレゼンス情報 (占有数、サブスクライバー UUID) を取得します。write_pubnub_appを使用して複数の言語で PubNub SDK を初期化するためのコード スニペットを含む、PubNub アプリケーションを作成するためのステップバイステップの手順を生成します。環境変数の構成: SDK 操作の認証に
PUBNUB_PUBLISH_KEYとPUBNUB_SUBSCRIBE_KEYをサポートします。ドキュメントのフォーマットの一貫性を保つために、
jsdomとturndownを使用してリモート HTML 記事を Markdown に変換します。すべてのツールパラメータに対して Zod スキーマによる入力検証を実行し、堅牢なエラー処理を保証します。
McpServerおよびStdioServerTransportを使用した Model Context Protocol SDK (@modelcontextprotocol/sdk) を活用した拡張可能なツール定義。
Related MCP server: MCP Documentation Server
プロンプトの例
「PubNub のマルチユーザー チャットを組み込んだストリーミング ビデオをユーザーが視聴できる PubNub アプリを作成します。」
「地図を使って食料品をオンデマンドで配達する PubNub アプリを作成します。」
「荷物の位置をリアルタイムで追跡する PubNub アプリを作成します。」
「リアルタイムで天気予報を表示する PubNub アプリを作成します。」
「ユーザーが友達とマルチプレイヤー ゲームをプレイできる PubNub アプリを作成します。」
「株価とニュースの最新情報をリアルタイムで表示する PubNub アプリを作成します。」
「ユーザーがプレイリストを作成して友人と共有できる PubNub アプリを作成します。」
「
my_channelチャネルをサブスクライブし、コンソールにメッセージを記録する PubNub JavaScript アプリを構築します。」「
Hello, PubNub!というメッセージをmy_channelチャネルに公開します。」「
subscribe()の PubNub JavaScript SDK ドキュメントを表示してください。」「利用可能なすべての PubNub 関数を一覧表示します。」
「
publish()メソッドの Python SDK ドキュメントを取得します。」「
testチャネルのメッセージ履歴を取得します。」「
testチャネルとdefaultチャネル グループのプレゼンス情報 (占有状況と UUID) を取得します。」
これには Node.js (>= 18) と npm ( https://nodejs.org/ ) が必要です。npx npx最新の MCP サーバーを自動的に取得して実行します。
前提条件
Node.js (>= 18) と npm
MCP をサポートするカーソル IDE
(オプション) ライブサンプル用の PubNub アカウントと API キー
インストール
PubNub MCP サーバーをローカルで実行したり、npx 経由で Cursor IDE に追加したりするための推奨方法は次のとおりです。
npx -y @pubnub/mcp構成
MCP サーバーを使用するには、カーソルがエージェント モードになっている必要があります。
Cursor IDE は JSON 設定ファイルを介して MCP サーバーを検出します。PubNub MCP サーバーをグローバルまたはプロジェクトごとに設定できます。
グローバル構成
~/.cursor/mcp.jsonを編集または作成します。
{
"mcpServers": {
"pubnub": {
"command": "npx",
"args": ["-y", "@pubnub/mcp"],
"env": {
"PUBNUB_PUBLISH_KEY": "YOUR_PUBLISH_KEY",
"PUBNUB_SUBSCRIBE_KEY": "YOUR_SUBSCRIBE_KEY"
}
}
}
}プロジェクト構成
プロジェクト ディレクトリに.cursor/mcp.jsonを作成します。
{
"mcpServers": {
"pubnub": {
"command": "npx",
"args": ["-y", "@pubnub/mcp"],
"env": {
"PUBNUB_PUBLISH_KEY": "YOUR_PUBLISH_KEY",
"PUBNUB_SUBSCRIBE_KEY": "YOUR_SUBSCRIBE_KEY"
}
}
}
}Dockerベースの構成
MCP サーバーを Docker 経由で実行する場合は、PubNub キーを環境変数として設定します。
export PUBNUB_PUBLISH_KEY=YOUR_PUBLISH_KEY
export PUBNUB_SUBSCRIBE_KEY=YOUR_SUBSCRIBE_KEY次に、 ~/.cursor/mcp.json (またはプロジェクト内の.cursor/mcp.json ) を設定します。
{
"mcpServers": {
"pubnub": {
"command": "docker",
"args": [
"run",
"-i",
"-e",
"PUBNUB_PUBLISH_KEY",
"-e",
"PUBNUB_SUBSCRIBE_KEY",
"pubnub/pubnub-mcp-server"
]
}
}
}command、MCP サーバーを起動する実行可能ファイルを指定します。argsコマンドに渡す引数を指定します。envサーバープロセスの環境変数を設定します。
カーソルIDEでの使用
カーソル IDE を再起動するか、新しいセッションを開きます。
MCP 設定ペインを開き、 pubnubサーバーが**[利用可能なツールとリソース]**の下にリストされていることを確認します。
チャットで利用可能なリソースを呼び出します。
pubnub://docs/javascript— PubNub JavaScript SDK ドキュメントを取得しますpubnub://docs/python— PubNub Python SDK ドキュメントを取得しますpubnub://docs/java— PubNub Java SDK ドキュメントを取得しますpubnub://functions— PubNub 関数の一覧を表示します(resources/pubnub_functions.mdからの静的コンテンツ)
プロンプトが表示されたらリソースの実行を承認するか、信頼できるリソースの設定で自動実行を有効にします。
クロード・コード
## Install the MCP server if you have node >= 18
claude mcp add pubnub -e PUBNUB_PUBLISH_KEY=your_publish_key -e PUBNUB_SUBSCRIBE_KEY=your_subscribe_key -- npx -y @pubnub/mcp
## Install the MCP server if you have node < 18 and need to point to the full path of node
claude mcp add pubnub -e PUBNUB_PUBLISH_KEY=your_publish_key -e PUBNUB_SUBSCRIBE_KEY=your_subscribe_key -- /Users/stephen/.nvm/versions/node/v22.14.0/bin/node /Users/stephen/Projects/mcp-pubnub/index.js
## Install the MCP server using Docker
# Ensure your PubNub keys are set as environment variables:
export PUBNUB_PUBLISH_KEY=your_publish_key
export PUBNUB_SUBSCRIBE_KEY=your_subscribe_key
# Depending on your machine’s CPU architecture, you may need to specify the target platform.
# For example:
# docker run --platform linux/arm64 -i pubnub/pubnub-mcp-server
# docker run --platform linux/amd64 -i pubnub/pubnub-mcp-server
claude mcp add pubnub -- docker run -i \
-e PUBNUB_PUBLISH_KEY=$PUBNUB_PUBLISH_KEY \
-e PUBNUB_SUBSCRIBE_KEY=$PUBNUB_SUBSCRIBE_KEY \
pubnub/pubnub-mcp-server出力は次のようになります。
Added stdio MCP server pubnub with command: npx -y @pubnub/mcp to local configプロンプトの例
claude "publish a message 'hi' to the 'my_channel' pubnub channel."claude "publish a message 'hi' to the 'my_channel' pubnub channel."
╭───────────────────────────────────────────────────╮
│ ✻ Welcome to Claude Code research preview! │
│ │
│ /help for help, /status for your current setup │
│ │
│ cwd: /Users/stephen/Projects/mcp-pubnub │
╰───────────────────────────────────────────────────╯
※ Tip: Press Option+Enter to send a multi-line message
> publish a message 'hi' to the 'my_channel' pubnub channel.
⏺ I'll publish a message to the PubNub channel for you.
⏺ pubnub:publish_pubnub_message (MCP)(channel: "my_channel", message: "hi")…
⎿ Message published successfully. Timetoken: 17467422499409217
⏺ Message published successfully to "my_channel".次のコマンドで MCP サーバーを削除します。
claude mcp remove pubnubClaudeデスクトップの使用
Claude Desktop の Docker ベースの MCP サーバーを希望する場合:
PubNub キーがシェルにエクスポートされていることを確認します。
export PUBNUB_PUBLISH_KEY=your_publish_key export PUBNUB_SUBSCRIBE_KEY=your_subscribe_keyClaude Desktop のツールセクションで、 pubnubという名前の新しいツールを追加します。
コマンドを
dockerに設定します。引数を次のように設定します:
[ "run", "-i", "-e", "PUBNUB_PUBLISH_KEY", "-e", "PUBNUB_SUBSCRIBE_KEY", "pubnub/pubnub-mcp-server" ]
**注:**一部のマシン(例:Apple Silicon)では、Dockerプラットフォームの指定が必要になる場合があります。Arguments配列の
"run"の直後に--platform linux/arm64(または--platform linux/amd64)を追加してください。例:[ "run", "--platform", "linux/arm64", "-i", "-e", "PUBNUB_PUBLISH_KEY", "-e", "PUBNUB_SUBSCRIBE_KEY", "pubnub/pubnub-mcp-server" ]
設定を保存します。
Claude Desktop は、Docker 経由で PubNub MCP サーバー コンテナーを呼び出します。
ライセンス
このプロジェクトはMITライセンスの下で提供されています。詳細はLICENSEファイルをご覧ください。
トラブルシューティング
MCP サーバーを使用するにはエージェント モードにする必要があります。
Node.js と npm のインストールを確認します。
index.jsに実行権限があることを確認します。command、args、およびenv設定が正しいことを確認します。MCP 起動エラーについては、カーソル IDE ログを確認します。
JSON-RPC コマンドラインの直接使用
JSON-RPC v2.0 を使用すると、STDIN/STDOUT 経由で MCP サーバーを直接呼び出すことができます。PubNub キーが環境に設定されていることを確認してください。例:
PUBNUB_PUBLISH_KEY=YOUR_PUBLISH_KEY \
PUBNUB_SUBSCRIBE_KEY=YOUR_SUBSCRIBE_KEY \
node index.jsサーバーが起動したら(または1回限りの呼び出しを使用したら)、JSONをnode index.jsにパイプしてリクエストを送信します。例:
# 1) List available tools
echo '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}' \
| node index.js
# 2) Read PubNub JavaScript SDK documentation
echo '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":
{"name":"read_pubnub_sdk_docs","arguments":{"language":"javascript"}}}' \
| node index.js
# 3) Read PubNub Functions Resource docs (static Markdown)
echo '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"read_pubnub_resources","arguments":{"document":"pubnub_functions"}}}' \
| node index.js
簡単なJSON-RPCの例
以下は、STDIN/STDOUT を使用して PubNub SDK ドキュメントを取得し、メッセージを公開する簡略化された JSON-RPC v2.0 コマンドラインの例です。
1) PubNub JavaScript SDKドキュメントを取得する
echo '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"read_pubnub_sdk_docs","arguments":{"language":"javascript"}}}' | node index.js2) PubNubチャネルにメッセージを公開する
PUBNUB_PUBLISH_KEY=demo \
PUBNUB_SUBSCRIBE_KEY=demo \
echo '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"publish_pubnub_message","arguments":{"channel":"my_channel","message":"Hello, PubNub MCP JSON-RPC!"}}}' \
| node index.jsAvailable Tools
16 toolsget_chat_sdk_documentationGet PubNub Chat SDK DocumentationA
Retrieve Chat SDK documentation for building chat/messaging applications.
**When to use:**
- Building ANY chat or messaging application (1:1, group, channels)
- Need typing indicators, read receipts, @mentions, unread counts
- Want message threads, reactions, pinned messages, moderation
- Need user/channel management with chat-specific features
- Prefer rapid development with intuitive methods like sendText(), startTyping(), join()
**Do NOT use for:**
- Non-chat real-time apps (IoT, gaming state, analytics) → use "get_sdk_documentation"
- Conceptual guides → use "how_to"
**Example features:**
- messages-send-receive, messages-threads, messages-reactions
- channels-create, channels-join, channels-typing-indicator
- users-mentions, users-presence
Returns code examples and API references for the specified language/feature.| Name | Required | Description | Default |
|---|---|---|---|
| language | Yes | ||
| feature | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full burden. It states it returns code examples and API references, which is sufficiently transparent for a read-only documentation tool, though it could elaborate on return format or limitations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Well-structured with sections and bullet points, front-loaded with purpose. Slight redundancy in listing features twice, but overall concise and easy to scan.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple documentation retrieval tool with 2 enum parameters and no output schema, the description provides complete context on usage, features, and expected output, enabling correct tool selection.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, and the description does not explicitly detail each parameter. It implicitly refers to language and feature, but the enum values are mostly self-explanatory; missing explanations for less obvious ones like 'messages-drafts_v1'.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it retrieves Chat SDK documentation for building chat/messaging applications, lists example features, and distinguishes from siblings like get_sdk_documentation and how_to by specifying scope and alternatives.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicit 'When to use' and 'Do NOT use for' sections provide clear guidance on appropriate contexts and alternatives, naming get_sdk_documentation for non-chat and how_to for conceptual guides.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_general_migration_guideGet PubNub General Migration GuideA
Retrieve general migration guides for cross-cutting PubNub platform changes.
**When to use:**
- Migrating to a new encryption standard (e.g. 256-bit encryption)
- Upgrading push notification setup (e.g. APNs HTTP/2, FCM v1)
- Migrating to new API versions (e.g. Access Manager v3, Objects v2)
- Replacing deprecated features (e.g. legacy webhooks)
**Do NOT use for:**
- SDK version upgrades (e.g. JavaScript v7→v8) → use "get_sdk_migration_guide"
- General SDK documentation → use "get_sdk_documentation"
Returns the migration guide content for the specified slug.| Name | Required | Description | Default |
|---|---|---|---|
| slug | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided. Description does not disclose behavioral details beyond stating it returns content. Lacks info on read-only nature, authentication, or response format.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Well-structured with sections, concise, no superfluous information. Every sentence is earned.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Complete enough for a simple 1-parameter tool. Could mention response format, but the examples and scope are sufficient.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema has 0% coverage, but description provides concrete enum examples in 'When to use' section, adding practical value beyond the schema's enum list.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clearly states it retrieves general migration guides for cross-cutting PubNub platform changes, specifying verb+resource. Distinguishes from sibling tools get_sdk_migration_guide and get_sdk_documentation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly lists when to use and when NOT to use, with concrete examples and alternative tools named (e.g., 'use get_sdk_migration_guide').
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_pubnub_messagesGet PubNub Channel HistoryA
Fetches historical messages from one or more PubNub channels. Call this tool whenever you need to access past message history. Provide a list of channel names. Returns message content and metadata in JSON format. Supports pagination with start/end timetokens and count limit.
| Name | Required | Description | Default |
|---|---|---|---|
| channels | Yes | List of channel names to fetch history from | |
| start | No | Timetoken delimiting the start (exclusive) of the time slice to pull messages from | |
| end | No | Timetoken delimiting the end (inclusive) of the time slice to pull messages from | |
| count | No | Number of historical messages to return per channel | |
| publishKey | Yes | Publish Key that can be obtained from your keyset by manage_keysets tool with parameter operation list or in PubNub admin portal | |
| subscribeKey | Yes | Subscribe Key that can be obtained from your keyset by manage_keysets tool with parameter operation list or in PubNub admin portal |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so the description carries full burden. It clearly states it is a read operation fetching history, supports pagination with timetokens, and returns JSON. It could mention rate limits or authentication needs, but is adequate.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise with two clear sentences: one for purpose and one for usage details. No unnecessary words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema, the description notes the return format (JSON with content and metadata) and pagination. Parameters are well-described in schema. It could mention edge cases like empty channels but is mostly complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so baseline is 3. The description briefly mentions providing channel names and pagination parameters but does not add significant meaning beyond the schema descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it fetches historical messages from PubNub channels, distinguishing it from sibling tools like send_pubnub_message and subscribe_and_receive_pubnub_messages.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description says 'call this tool whenever you need to access past message history,' which provides general guidance but does not explicitly state when not to use it or compare with alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_pubnub_presenceGet Presence Data (HereNow / WhereNow)B
Retrieves real-time presence information. Use 'channels'/'channelGroups' for HereNow (occupancy/users in channel) and/or 'uuid' for WhereNow (channels a user is in). Returns presence data in JSON format. Requires publish and subscribe keys from your PubNub keyset.
| Name | Required | Description | Default |
|---|---|---|---|
| channels | No | List of channel names (strings) to query presence data for | |
| channelGroups | No | List of channel group names (strings) to query presence data for | |
| uuid | No | UUID to query channel subscriptions for (WhereNow) | |
| publishKey | Yes | Publish Key that can be obtained from your keyset by manage_keysets tool with parameter operation list or in PubNub admin portal | |
| subscribeKey | Yes | Subscribe Key that can be obtained from your keyset by manage_keysets tool with parameter operation list or in PubNub admin portal |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It mentions real-time data retrieval and JSON output, but lacks details on side effects, safety, rate limits, or authentication nuances. For a read operation, minimal disclosure.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three sentences: purpose, usage guidance, output and requirements. Each sentence is essential and front-loaded. No wasted words, clear structure.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description mentions JSON output but omits details on error handling, empty results, or rate limits. Given no output schema, it provides adequate but not comprehensive context for a tool with 5 parameters.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, but the description adds value by explaining the functional roles of parameters (channels/channelGroups for HereNow, uuid for WhereNow) and highlighting key requirements. This goes beyond the schema descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it retrieves real-time presence information and distinguishes HereNow from WhereNow based on parameters. It uses specific verb 'retrieves' and resource 'presence information'. However, it does not explicitly differentiate from sibling tools, but the sibling set is diverse, making this tool unique.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides guidance on when to use channels/channelGroups versus uuid for HereNow/WhereNow. It implies usage context but does not specify when not to use the tool or mention alternatives like other tools for similar tasks.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_sdk_documentationGet PubNub Core SDK DocumentationA
Retrieve Core SDK documentation for low-level real-time features.
**When to use:**
- Building NON-CHAT real-time apps (IoT, gaming state sync, live analytics, notifications)
- Need fine-grained control over pub/sub, presence, storage, or access management
- Implementing custom real-time patterns
- Need API reference for specific SDK methods (publish, subscribe, history, etc.)
**Do NOT use for:**
- Chat/messaging apps → use "get_chat_sdk_documentation" instead
- Conceptual guides → use "how_to"
Returns code examples, API references, and implementation guides for the specified language/feature combination.| Name | Required | Description | Default |
|---|---|---|---|
| language | Yes | ||
| feature | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden. It states the output includes 'code examples, API references, and implementation guides,' which implies a read-only, side-effect-free operation. However, it does not explicitly declare read-only safety or mention any restrictions, but for a documentation tool this is adequate.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with headings and bullet points, front-loading the purpose and providing all key information in a concise manner without unnecessary filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema, the description adequately explains the return type (code examples, API references, implementation guides) and usage context. It could mention pagination or size limits, but for a documentation tool this is sufficient.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It only refers to 'specified language/feature combination' without explaining what the enum values mean or adding any parameter-specific details beyond the schema field names. This is a significant gap.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Retrieve Core SDK documentation for low-level real-time features' with a specific verb and resource. It distinguishes from siblings by explicitly naming get_chat_sdk_documentation for chat apps and how_to for conceptual guides.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit 'When to use' and 'Do NOT use for' sections, with alternative tool names for each exclusion case, offering clear guidance on when to invoke this tool versus others.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_sdk_migration_guideGet PubNub SDK Migration GuideA
Retrieve SDK migration guides for upgrading between PubNub SDK versions.
**When to use:**
- Upgrading a PubNub SDK to a newer major version
- Need step-by-step instructions for migrating breaking changes
- Refactoring a codebase after a PubNub SDK version bump
**Do NOT use for:**
- General SDK documentation → use "get_sdk_documentation"
- Chat SDK documentation → use "get_chat_sdk_documentation"
Returns the migration guide content for the specified language and target version.| Name | Required | Description | Default |
|---|---|---|---|
| language | Yes | ||
| version | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the burden. It states the tool returns 'migration guide content for the specified language and target version', which is a basic behavioral trait. It does not disclose any additional traits like idempotency, rate limits, or potential errors. The clarity is adequate but lacks depth for a fully transparent definition.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with clear sections and bullet points, front-loading the core purpose. Minor verbosity from markdown formatting (bold, line breaks) but overall efficient. Every sentence earns its place, though the 'When to use' and 'Do NOT use for' sections could be slightly condensed.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's low complexity (two enum parameters, read-only behavior), the description sufficiently covers purpose, usage guidelines, and sibling differentiation. It lacks an output schema but explicitly states what is returned ('migration guide content'). This is adequate for the tool's simplicity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate for missing parameter explanations. The description merely references 'specified language and target version' without adding details beyond the enum names (e.g., valid versions 7,8,10,13). It does not explain what each version maps to or any additional constraints. The enum values are self-explanatory, but the description adds minimal value.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses the specific verb 'Retrieve' and clearly identifies the resource as 'SDK migration guides for upgrading between PubNub SDK versions'. It explicitly distinguishes from sibling tools like 'get_sdk_documentation' and 'get_chat_sdk_documentation' by naming them in the 'Do NOT use for' section.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description includes explicit 'When to use' and 'Do NOT use for' sections, listing concrete scenarios (e.g., upgrading major versions, need step-by-step instructions) and specific sibling tool alternatives (e.g., 'get_sdk_documentation' for general docs). This provides clear guidance on when to invoke this tool vs. others.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_usage_metricsGet PubNub Usage MetricsB
Fetches usage metrics from the PubNub Admin API for an account, app, or keyset.
**Parameters:**
- entityType: 'account', 'app', or 'keyset'
- entityId: The ID of the entity
- from: Start date (inclusive) in YYYY-MM-DD format
- to: End date (exclusive) in YYYY-MM-DD format
- metrics: Array of metric names to retrieve
**Available Metric Categories:**
- Core transactions: txn_total, mtd_txn_total, replicated, signals, edge
- MAU/UUID: mtd_uuid, uuid, pn_uuid
- Messages: msgs_total, publish, subscribe_msgs, history_msgs, files_msgs, push_msgs
- Storage: bytes_stored, bytes_stored_messages, bytes_stored_files, etc.
- Access Manager: accessmanager_grants_transactions, accessmanager_audits_transactions
- Functions: executions, kv_read_transactions, kv_write_transactions
- History: history_transactions, history_with_actions_transactions
- Message Actions: message_actions_add_transactions, message_actions_get_transactions
- Objects/App Context: objects_create_user_transactions, objects_get_user_transactions, etc.
- Presence: presence_herenow_transactions, presence_wherenow_transactions
- Push Notifications: apns_sent_transactions, gcm_sent_transactions
- Subscribe: subscribe_transactions, subscribe_heartbeats_transactions
- Publish: publish_transactions, publish_bytes
- Signal: signal_transactions
- Files: files_publish_transactions, files_get_file_transactions| Name | Required | Description | Default |
|---|---|---|---|
| entityType | Yes | The type of entity to fetch metrics for: 'account', 'app', or 'keyset'. | |
| entityId | Yes | The ID of the entity (account ID, app ID, or keyset ID). | |
| from | Yes | Start date (inclusive) in YYYY-MM-DD format. | |
| to | Yes | End date (exclusive) in YYYY-MM-DD format. | |
| metrics | Yes | Array of metric names to retrieve. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must cover behavioral traits. It does not mention rate limits, authentication needs, destructive potential, or response structure. Listing parameters and metrics is helpful but insufficient for behavioral transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is structured with headings and separates parameter info from metric categories, but it is lengthy due to the exhaustive list of 75+ metrics. This could be trimmed or referenced externally to improve conciseness without losing clarity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity (5 parameters, many enum values, no output schema or annotations), the description lacks return format, error handling, rate limits, and prerequisites. It explains parameters and metrics but leaves the overall usage context incomplete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the schema already documents all parameters. The description adds value by summarizing parameter types and listing available metric categories, but does not provide deeper semantics beyond the schema. Baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Fetches usage metrics from the PubNub Admin API for an account, app, or keyset.' It specifies the verb (fetches), resource (usage metrics), and scope (account/app/keyset), distinguishing it from sibling tools like get_pubnub_messages or manage_apps which cover different data.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explains what the tool does but offers no guidance on when to use it versus alternatives, nor any exclusions. It implicitly suggests usage for retrieving metrics, but lacks explicit context or comparisons to siblings like get_pubnub_presence.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
how_toGet PubNub How-To GuideA
Retrieve conceptual guides for specific PubNub use cases and integrations. When to use: - Learning how to implement a specific use case (gaming, healthcare, IoT) - Need step-by-step integration guide for a platform (Unity, Unreal etc) - Understanding PubNub features in context (presence, push notifications, functions)
**Do NOT use for:**
- API reference or code samples of a specific PubNub features → use `get_sdk_documentation` or `get_chat_sdk_documentation`
- General best practices → use `write_pubnub_app`
| Name | Required | Description | Default |
|---|---|---|---|
| slug | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are present, but the description does not disclose whether the tool is read-only, what the output looks like, or any side effects. For a simple retrieval tool, this is acceptable but not fully transparent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Description is well-structured with clear sections and no unnecessary words. It earns its place by providing actionable usage guidance.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
While the tool is simple, the description omits what the return value is (e.g., text, markdown). With no output schema, this is a notable gap for an agent to understand the result.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0% and the description adds no explanation for the 'slug' parameter beyond what the enum provides. The agent must infer that slug identifies a guide without explicit guidance.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states the tool retrieves conceptual guides for specific use cases and integrations. It distinguishes from siblings by naming alternatives in the 'Do NOT use' section.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Provides explicit 'When to use' and 'Do NOT use for' sections with concrete sibling tool names, offering clear guidance on when to select alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
insightsQuery PubNub InsightsA
Queries PubNub Insights — read-only aggregated analytics scoped to an account, app, or keyset.
**Entity scoping:** Every query requires an entityType ('account', 'app', or 'keyset') and
an entityId. For 'account' and 'app', the entityId is the numeric ID. For 'keyset', the
entityId is the subscribe key (sub-c-...).
Two endpoints, picked automatically by metric name:
- /v2/insights → aggregated metrics (unique_channels, unique_users, messages, etc.)
- /v2/insights/top → ranked metrics (top_20_channels, top_20_users, top_10_message_types, etc.)
TOOL SELECTION GUIDE — Insights Claude Behavior:
1. Group-aware: Insights metrics are organized into 5 functional groups — Channels, Users,
Messages, User Behavior, Devices. When a user asks an analytic question, pick the right
group first and then the specific metric. See the how-to guides:
how_to(slug="how-to-get-insights-api-access"), channels, users, messages,
user-behavior-and-devices, filters.
2. Period rules (enforced at runtime):
- Duration metrics (avg_user_duration, unique_users_by_duration_timeframe,
top_*_channels_with_user_duration) → period=hourly ONLY.
- Top-N metrics (top_20_*, top_1000_*) → hourly or daily ONLY (no weekly/monthly).
- Country metrics → hourly or daily ONLY.
- new_vs_recurring_users → daily / weekly / monthly only (NOT hourly).
- All other metrics → all four periods supported.
3. Top metrics REQUIRE category. Without it, the call errors. Valid categories:
by_messages, by_chats, by_subscribers, by_users_with_messages,
by_users_with_chats, by_subscribed_channels, all.
4. Top-metric filtering uses `filters` (JSON), not `filter`. Use `filters` on
top_20_* / top_1000_* for thresholds (count_messages gt), allowlists (channel_name
in), and prefixes (uuid startsWith). Use `filter` only on channel_patterns.
5. UTC timestamps. fromDate and toDate are YYYY-MM-DD in UTC. Always frame the response
with the date range and timezone so the user has unambiguous context.
6. Top-N counts CANNOT be summed across periods. If the user asks for "top channels this
week" and you query with period=daily, return one ranking per day, not a weekly sum.
7. Default to period=daily for most queries. It supports the widest set of metrics and
gives a clean trend view. Use hourly only when intra-day granularity is needed or for
duration metrics.
8. Account must be on Insights Premium. Free plan has no API access. Pro existing
customers may need to upgrade from Standard to Premium. If a 403 comes back, surface
this as the likely cause.
9. The tool does not write or store anything. Insights is strictly read-only.
| Name | Required | Description | Default |
|---|---|---|---|
| entityType | Yes | The type of entity to fetch metrics for: 'account', 'app', or 'keyset'. Use 'keyset' with a subscribe key as entityId for keyset-scoped queries. | |
| entityId | Yes | The ID of the entity. For entityType='account': numeric account ID. For 'app': numeric app ID. For 'keyset': the subscribe key (sub-c-...). | |
| metric | Yes | Insights metric to query. Top metrics (top_20_*, top_1000_*) route to /v2/insights/top automatically and require the `category` parameter. Duration metrics (avg_user_duration, unique_users_by_duration_timeframe, top_*_channels_with_user_duration) only support period=hourly. new_vs_recurring_users does NOT support period=hourly. See Period Restrictions table in the how-to guide for the full matrix. | |
| period | Yes | Time grain. Default to `daily` for most queries. Use `hourly` for intra-day or duration metrics. `weekly` and `monthly` are not supported by top-N metrics, country breakdowns, or some other categories. | |
| fromDate | Yes | Start date (inclusive) in YYYY-MM-DD format, UTC. | |
| toDate | Yes | End date (inclusive) in YYYY-MM-DD format, UTC. | |
| category | No | Required ONLY for top metrics (top_20_*, top_1000_*). Picks the ranking dimension. by_subscribers, by_users_with_messages, by_users_with_chats apply to channel rankings only. by_subscribed_channels applies to user rankings only. Use `all` for combined results. | |
| filter | No | Filter expression for metric=channel_patterns only (`startsWith:group.` or `eq:lobby`). Do not use for top metrics — use `filters` instead. | |
| filters | No | JSON object for top metrics on /v2/insights/top. Top-level key must match `metric` (e.g. top_1000_channels). Value is an array of {field, operator, value} conditions combined with AND. Operators: eq, neq, gt, lt, gte, lte, in, nin, startsWith. See how_to(slug="how-to-query-insights-filters"). | |
| orderBy | No | Sort field and direction (e.g. `count_messages:desc`). Optional — most metrics default to a sensible ordering. | |
| limit | No | Number of results to return. Optional — top metrics already cap at 20 or 1000 by name. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description fully covers behavioral traits: read-only operation, period restrictions, UTC timestamps, inability to sum top-N counts across periods, account plan requirements, and filtering nuances. This exceeds disclosure expectations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with a clear opening, bullet points, and a numbered guide. It is slightly verbose for the amount of detail, but every sentence adds value. The front-loading of core purpose is effective.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given 11 parameters, no output schema, and no annotations, the description covers all critical aspects: entity scoping, endpoint selection, period constraints, parameter relationships, error handling (403), and operational caveats. It is fully sufficient for correct tool invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Although schema coverage is 100%, the description adds substantial context: entity scoping rules, endpoint routing by metric type, period applicability matrix, category requirement for top metrics, filter vs filters distinction, and default behaviors. This significantly enriches the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Queries PubNub Insights — read-only aggregated analytics scoped to an account, app, or keyset.' This specifies the verb (query), resource (PubNub Insights), and distinguishes it from sibling tools like get_usage_metrics.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The 'TOOL SELECTION GUIDE' provides detailed when-to-use instructions for metrics, periods, and parameters. However, it does not explicitly compare this tool to alternative sibling tools for similar queries, leaving some ambiguity for AI agent selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
manage_app_contextManage PubNub App ContextA
Manages PubNub App Context (Objects API) for users, channels, and memberships. Supports CRUD operations including get, set, remove, and getAll. Use this tool to manage user profiles, channel metadata, and membership relationships in your PubNub application.
| Name | Required | Description | Default |
|---|---|---|---|
| type | Yes | Type of App Context object: "user" for user metadata, "channel" for channel metadata, "membership" for user-channel relationships | |
| operation | Yes | Operation to perform: "get" to retrieve, "set" to create/update, "remove" to delete, "getAll" to list all | |
| id | Yes | Identifier: UUID (defaults to the SDK-configured user when omitted) for users and membership operations, channel metadata id (for example, team.red) for channel metadata and channel member operations | |
| data | No | Data object for set/remove operations. For users: {name, email, externalId, profileUrl, custom}. For channels: {name, description, custom}. For memberships: {channels: [...]} — set operations accept strings or objects with {id, custom, status, type}, while remove operations accept only string channel IDs. For channel members: {uuids: [...]} — set operations accept strings or objects with {id, custom, status, type}, while remove operations accept only string UUIDs. | |
| options | No | Optional parameters for the operation | |
| publishKey | Yes | Publish Key that can be obtained from your keyset by manage_keysets tool with parameter operation list or in PubNub admin portal | |
| subscribeKey | Yes | Subscribe Key that can be obtained from your keyset by manage_keysets tool with parameter operation list or in PubNub admin portal |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden for behavioral disclosure. It only mentions the high-level CRUD operations without detailing side effects (e.g., data mutation, authentication requirements, rate limits, or pagination behavior). This is a significant gap for a mutation tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is three concise sentences, front-loaded with the purpose and immediately clarifying what objects and operations are supported. Every sentence adds value with no redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity (7 parameters, nested objects, no output schema), the description covers the core purpose but lacks details on error handling, return values, pagination, or filtering options. The schema provides some details, but the description could better integrate guidance for complex operations like membership management.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so baseline is 3. The description adds little beyond what the schema already provides (e.g., 'user profiles' vs. schema's 'user metadata'). It does not provide new semantic guidance for parameters like 'id' or 'data' that would help the agent construct correct inputs.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it manages PubNub App Context for users, channels, and memberships, listing specific CRUD operations (get, set, remove, getAll). This distinguishes it from sibling tools like manage_apps or manage_keysets, which deal with different resources.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly says 'Use this tool to manage user profiles, channel metadata, and membership relationships,' which gives clear context for when to use it. However, it does not mention when not to use it or suggest alternative tools for related but different tasks.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
manage_appsManage PubNub AppA
Manages PubNub apps with operations: list, create, update. - 'list': List all apps on your account. - 'create': Create a new app. User must provide data.name. - 'update': Update an existing app name. User must provide data.id and data.name.
| Name | Required | Description | Default |
|---|---|---|---|
| operation | Yes | Operation to perform: 'list' to list all apps, 'create' to create a new app, 'update' to update an existing app. | |
| data | No | Operation-specific data. For 'list': not required. For 'create': {name}. For 'update': {id, name}. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the burden. It discloses that create and update are mutating operations, and list is read-only. It also mentions required fields per operation. However, it does not cover side effects, authentication needs, or rate limits.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise with two sentences and bullet points for each operation. It is front-loaded and efficient, though the operation enum description in the schema is partially repeated.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema and no annotations, the description covers all operations and required fields adequately. It provides enough context for an agent to use the tool correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, baseline 3. The description adds meaning by explicitly stating required fields per operation (e.g., data.name for create, data.id and data.name for update) and clarifying that data is not required for list, which goes beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it manages PubNub apps with three operations (list, create, update), using specific verbs and resource. It distinguishes from sibling tools like manage_keysets and manage_app_context.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context for each operation, specifying required fields for create and update. However, it does not explicitly state when not to use this tool or suggest alternatives among siblings.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
manage_illuminateManage PubNub IlluminateA
Manages PubNub Illuminate resources with operations: list, get, create, update, delete, activate, deactivate, get-fields, execute-adhoc, publish-fake-data, verify-query, check-action-log, raw-snapshot, aggregate, field-health, and custom-query.
Supports full CRUD for: Business Objects, Metrics, Queries, Decisions, and Dashboards.
**Operations:**
- list: GET all resources of a given type
- get: GET one resource by id
- create: POST a new resource (Decisions use automatic 2-step POST→PUT workflow)
- update: PUT/replace a resource
- delete: DELETE a resource (Business Object delete cascades to all associated resources)
- activate / deactivate: toggle isActive (Business Object) or enabled (Decision)
- get-fields: fetch Query output field definitions (required before building a Query Decision)
- execute-adhoc: run a one-off Query pipeline without saving it
- publish-fake-data: generate type-aware fake PubNub messages and publish them to test Decisions. Fetches BO field schema and produces realistic values per field type. Payloads are NESTED to match each field's JSONPath (e.g. `$.message.body.application.user_id` produces `{ application: { user_id: ... } }`, not the flat key `"application.user_id"`), so JSONPath resolution works against nested BO schemas. Pass secret_key when the keyset has Access Manager enabled — initializing with the secret key grants root permissions and bypasses 403 errors. Alternatively pass auth_key with a token from grantToken(). Failures are reported per-message; partial publishes return success with a 'failures' array. NOTE: Illuminate ingests with a 20–30 second delay — wait before querying after publish.
- verify-query: execute a saved Query by id and return results (confirms data is flowing)
- check-action-log: fetch recent Decision action log entries to verify a Decision fired
- raw-snapshot: return the most recent rows from a Business Object via ad-hoc query
- aggregate: group and count BO data by user/channel or custom group_by fields
- field-health: check which BO fields are populated vs empty (reveals JSONPath mismatches)
- custom-query: run a fully custom ad-hoc pipeline
**ID Dependency Chain — always capture before proceeding:**
Business Object → id, fields[*].id
Metric → id, measureId, dimensionIds
Query → id, then call get-fields for output field IDs
Decision → id, inputFields[*].id, outputFields[*].id, actions[*].id
Dashboard → id, charts[*].id
**Critical Decision rules:**
hitType ('SINGLE'|'MATCH_ALL') and executeOnce (boolean) are required — omitting causes HTTP 500.
Handler auto-injects safe defaults (hitType=SINGLE, executeOnce=false, activeFrom=now, activeUntil=now+2yr).
The 2-step create workflow resolves field/action names → UUIDs in: action templates
(both output variable names AND input field names — input names are sentinel-substituted
pre-POST and restored post-POST), inputValues.inputFieldId, outputValues.outputFieldId,
outputValues.value (dollar-brace), actionValues.actionId, and
actionValues.executionLimitInputFieldIds. Use names everywhere.
If the PUT step fails the handler deletes the orphaned scaffold automatically.
**CRITICAL — QUERY decision input field naming:**
For sourceType=QUERY decisions, each inputField.name MUST exactly match the source
query's output field alias (case-sensitive, including underscores). Illuminate binds
query result rows to decision inputs by NAME — not by sourceId. If names don't match,
the decision will be created and activated successfully but will silently NEVER fire
even with valid data. Always run get-fields on the source query first and copy the
'field' values verbatim into your decision's inputFields[].name.
**Business Object limits (handler pre-flights and rejects on violation):**
- name: 1-100 characters
- fields[].name: 1-50 characters
- max 100 fields per BO
- **max 5 TEXT_LONG fields per BO** (use TEXT, which holds 256 chars, for shorter strings)
- keep `description` concise — overly long descriptions are rejected with HTTP 400 by the API
**Decision action default:**
When the user doesn't specify what action to fire, default to actionType='PUBNUB_PUBLISH'
with a message body that includes the relevant input/output values via dollar-brace
template references. PUBNUB_PUBLISH requires no external infrastructure and is trivially
verifiable via check-action-log or by subscribing to the target channel. Only use WEBHOOK
when the user has provided a specific URL.
NEVER delete without explicit user confirmation.
TOOL SELECTION GUIDE — Illuminate Claude Behavior:
1. Intent-first: Always start from the user's desired outcome. Ask what they want
to achieve before suggesting Business Objects, Metrics, or Decisions.
2. Preview-first: Before creating any resources, describe automation in 1-2 sentences
and show a conditions → actions decision table. Ask for confirmation before building.
3. Predefined templates: For spam (flooding/cross-posting) and ranking (Top N/Bottom N),
use the Query Builder predefined templates. Never recreate these from scratch.
4. Built-in BO fields: For chat/moderation/ranking, User/Channel/Message/Message Type
are auto-created. Never ask users to define them.
5. Start simple: Minimal decision for the core goal; add complexity only when requested.
6. PubNub extension: For delayed checks, scheduling, or orchestration beyond Illuminate,
suggest PubNub Functions or pub/sub as the first extension path.| Name | Required | Description | Default |
|---|---|---|---|
| resource | No | The Illuminate resource type to operate on. business-object: the data schema that maps JSONPath fields from PubNub messages. metric: aggregations (COUNT, SUM, AVG, MIN, MAX) over a Business Object field. query: flexible data pipeline (sources → transforms → output). decision: automation rule that evaluates conditions and fires actions. dashboard: visualisation of metrics with optional decision trigger overlay. | |
| operation | Yes | Operation to perform. list: GET all resources of this type. get: GET one resource by id. create: POST a new resource. Decision create runs a 2-step POST→PUT workflow automatically. update: PUT/replace a resource (decisions and dashboards are FULL replacements). delete: DELETE a resource by id (Business Object deletes cascade to all associated resources). activate: set isActive=true (business-object) or enabled=true (decision). deactivate: set isActive=false (business-object) or enabled=false (decision). get-fields: (query only) fetch output field definitions required to build QUERY decision inputFields. execute-adhoc: (query only) run a one-off pipeline without saving it. publish-fake-data: generate type-aware fake PubNub messages and publish them to test Decisions. Fetches BO field schema and produces realistic values per field type. Generated payloads are properly NESTED to match each field's JSONPath — e.g. a field with jsonPath '$.message.body.application.user_id' produces { application: { user_id: ... } }, not the flat key 'application.user_id'. This guarantees JSONPath resolution works against nested BO schemas. NOTE: Illuminate ingests with a 20–30 second delay — wait before querying after publish. verify-query: execute a saved Query by id and return results (confirms data is flowing). check-action-log: fetch recent Decision action log entries to verify a Decision fired. raw-snapshot: return the most recent rows from a Business Object via ad-hoc query. aggregate: group and count BO data by user/channel or custom group_by fields. field-health: check which BO fields are populated vs empty — reveals JSONPath mismatches. custom-query: run a fully custom ad-hoc pipeline supplied in the pipeline argument. | |
| id | No | Resource UUID. Required for: get, update, delete, activate, deactivate, get-fields, execute-adhoc. | |
| data | No | Request body for create, update, and execute-adhoc. BUSINESS OBJECT: create with isActive=false. Include 'subkeys' array with at least one subscribe key (sub-c-...). jsonPath fields must start with '$.message.body.'. Supported jsonFieldType: TEXT, TEXT_LONG, NUMERIC, TIMESTAMP, BOOLEAN. BO LIMITS (handler pre-flights and rejects on violation): name 1-100 chars, fields[].name 1-50 chars, max 100 fields per BO, MAX 5 TEXT_LONG fields per BO. Use TEXT (256 chars) for fields under 256 characters; reserve TEXT_LONG (1000 chars) for the longest free-text fields only. Keep `description` concise — overly long descriptions are rejected with HTTP 400 by the Illuminate API. Deactivate before editing measures/dimensions. METRIC: COUNT → set function='COUNT', omit measureId entirely. SUM/AVG/MIN/MAX → set function and measureId to a NUMERIC field ID. QUERY execute-adhoc: { version: '2.0', pipeline: { sources: [...], output: {...} } }. CRITICAL: version must be the string '2.0' — omitting causes 400. DECISION — the 2-step create workflow auto-resolves names → UUIDs in: (1) action template strings (e.g. body, channel) using dollar-brace syntax — you may reference output `variable` names (handled natively by the API) AND input field names (handler substitutes a sentinel pre-POST and swaps to ${UUID} post-POST), (2) rules[].inputValues[].inputFieldId, (3) rules[].outputValues[].outputFieldId, (4) rules[].outputValues[].value (dollar-brace syntax, references input or output field names), (5) rules[].actionValues[].actionId, and (6) rules[].actionValues[].executionLimitInputFieldIds (array of input-field names). Use inputField/outputField/action names everywhere — raw UUIDs are passed through unchanged. If the rule-install PUT fails, the handler automatically deletes the orphaned scaffold. Required fields (missing hitType or executeOnce causes HTTP 500): hitType: 'SINGLE' or 'MATCH_ALL'. executeOnce: true or false. activeFrom: ISO datetime e.g. '2026-01-01T00:00:00Z'. activeUntil: ISO datetime (handler defaults to now + 2 years if absent). Handler auto-injects these defaults if absent. BUSINESSOBJECT decision: set sourceId = businessObjectId at top level; inputFields.sourceType = 'FIELD'. METRIC COUNT: inputFields.sourceType = 'BUSINESSOBJECT' (count) or 'DIMENSION' (grouped). METRIC SUM/AVG/MIN/MAX: inputFields.sourceType = 'MEASURE' (value) or 'DIMENSION' (grouped). QUERY decision: inputFields.sourceType = 'QUERYFIELD'; get sourceIds from get-fields first. CRITICAL: each inputField.name MUST exactly match the source query's output field alias (case-sensitive). Illuminate binds query rows to decision inputs by NAME, not by sourceId. If names don't match, the decision will silently never fire even though the rule conditions are met. Fetch field names via get-fields and use them verbatim. Rules: every inputValues array must cover ALL inputFields (use operation='ANY' for unconstrained fields). Actions: use 'actionType' (not 'type'). OutputFields: use 'variable' and 'name' (no 'type'). ACTION DEFAULT: when the user doesn't specify what action to fire, default to actionType='PUBNUB_PUBLISH' with a message body that includes the relevant input/output values via dollar-brace template references. PUBNUB_PUBLISH requires no external infrastructure and is trivially verifiable via check-action-log or by subscribing to the target channel. Only use WEBHOOK when the user has provided a specific URL. Account limits: METRIC decisions max 3/account; saved queries ~10/account. DASHBOARD charts: use metric: { id: '<metricId>' } — NOT metricId directly. PUT is FULL replacement for charts array — always include all existing charts when updating. | |
| subscribe_key | No | PubNub subscribe key (sub-c-...). Required for business-object activate and publish-fake-data. Obtain via manage_keysets with operation list. | |
| publish_key | No | PubNub publish key (pub-c-...). Required for publish-fake-data. Obtain via manage_keysets with operation list. | |
| secret_key | No | PubNub secret key (sec-c-...). Optional for publish-fake-data. Use this when the keyset has Access Manager enabled — initializing the SDK with the secret key grants the publisher root permissions and bypasses 403 errors. Never expose secret keys to client devices. | |
| auth_key | No | PubNub Access Manager v3 grant token (authKey). Optional for publish-fake-data. Use this when the keyset has Access Manager enabled and you have a token issued via grantToken() that allows publishing on the test channels. Prefer secret_key for backend test harnesses unless you specifically need a scoped grant. | |
| bo_id | No | Business Object UUID. Required for: publish-fake-data, raw-snapshot, aggregate, field-health. | |
| query_id | No | Saved query UUID. Required for verify-query. | |
| decision_id | No | Decision UUID. Required for check-action-log. | |
| scenario | No | Fake-data scenario for publish-fake-data. generic: random users and channels (default). chat-flooding: many messages from one user on one channel — triggers message_count > N rules. cross-posting: same user posting to many channels — triggers channel_count > N rules. | |
| count | No | Number of fake messages to publish (1–50). Defaults to 5. | |
| user_id | No | Specific user ID to use for chat-flooding and cross-posting scenarios. | |
| channel | No | Specific channel for generic/chat-flooding publish. | |
| limit | No | Max rows to return for raw-snapshot, aggregate, field-health (1–500). Defaults to 50. | |
| group_by | No | Field names to group by for the aggregate operation (e.g. ['userId', 'channel']). Defaults to the first two TEXT fields found in the Business Object. | |
| pipeline | No | Full pipeline body for custom-query. Must include version='2.0': { version: '2.0', pipeline: { sources: [...], output: {...} } }. CRITICAL: version must be the string '2.0' — omitting it returns 400. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It discloses many behavioral traits: 2-step create workflow, cascading deletes, auto-injection of defaults, naming resolution, pre-flighting limits, ingestion delay, and the critical rule that QUERY decision input field names must match source query aliases. It also warns against deletion without confirmation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is very long and verbose, but it is well-structured with bold headers and sections. It could be more concise; some details (e.g., lengthy parameter descriptions for `data`) are repeated in the schema, and the TOOL SELECTION GUIDE could be shorter. Adequate but not optimally concise.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (18 parameters, nested objects, no output schema), the description is exceptionally complete. It covers all operations, constraints, edge cases, and usage guidance. There are no missing pieces relative to the tool's scope.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the baseline is 3. The description adds significant contextual meaning beyond the schema, such as explaining the 2-step Decision create workflow, the critical naming rules for input fields, default action choices, and limit enforcement. It enriches the agent's understanding of how parameters interact.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Manages PubNub Illuminate resources' and lists all 16 supported operations across 5 resource types. It distinguishes itself from sibling tools which cover different PubNub services (chat, keysets, messages, etc.), making it unambiguous when to use this tool.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description includes a 'TOOL SELECTION GUIDE' that provides best practices (intent-first, preview-first, start simple). However, it does not explicitly compare to sibling tools or state when to avoid using this tool. The implicit distinction from sibling tools is clear, but no exclusions are given.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
manage_keysetsManage PubNub KeysetA
Manages PubNub keysets with operations: get, list, create, update. - 'get': Get a specific keyset information. User needs to provide the keyset id. - 'list': List all keysets for your account or a specific app. - 'create': Create a new keyset. New keyset is created with Message Persistence, App Context, Files, and Presence enabled by default; the user must provide name, production, and config with nested objects (messagePersistence, appContext, files, presence), and if any required parameter is missing, you must ask the user to provide it. - 'update': Update an existing keyset. User needs to provide the keyset id and the config to update.
| Name | Required | Description | Default |
|---|---|---|---|
| operation | Yes | Operation to perform: 'get' to get specific keyset information, 'list' to list keysets, 'create' to create a new keyset, 'update' to update an existing keyset. | |
| data | No | Operation-specific data. For 'get': {id}. For 'list': {appId?}. For 'create': {name, appId?, type, config}. For 'update': {id, config}. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It discloses that create sets default values for certain features, but it lacks information on authorization, rate limits, or whether update is partial or full replacement. Some behavioral traits are mentioned but gaps remain.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description uses bullet points and is well-structured. It front-loads the overall purpose and then details each operation. It is relatively concise, though could be slightly more terse without losing meaning.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a complex tool with 4 operations and no output schema, the description covers key aspects like required fields, defaults, and operation-specific instructions. It does not mention return values or error handling, which would be beneficial, but given the complexity, the description is reasonably complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so baseline is 3. The description adds value by summarizing parameter usage per operation (e.g., 'for create: {name, appId?, type, config}') and explaining the structure of config. This helps the agent understand the complex nested parameters beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool manages PubNub keysets with four distinct operations: get, list, create, update. It uses specific verbs and resource (keysets), distinguishing it from sibling tools like manage_apps or manage_app_context.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context for each operation (e.g., 'get' requires keyset ID, 'create' requires name and type and config). It includes guidance like asking for missing parameters. However, it does not explicitly compare to alternatives or state when not to use this tool.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
send_pubnub_messageSend Message or Signal to PubNub ChannelA
Send a message or signal to a PubNub channel in real-time. Supports both regular messages and lightweight signals. Plain strings are automatically wrapped in a 'text' field. Requires publish and subscribe keys from your PubNub keyset.
| Name | Required | Description | Default |
|---|---|---|---|
| channel | Yes | Channel ID to publish message to | |
| message | Yes | Message payload (can be any JSON-serializable value or plain string) | |
| type | No | Type of message to publish: 'message' for regular messages or 'signal' for lightweight signals | message |
| publishKey | Yes | Publish Key that can be obtained from your keyset by manage_keysets tool with parameter operation list or in PubNub admin portal | |
| subscribeKey | Yes | Subscribe Key that can be obtained from your keyset by manage_keysets tool with parameter operation list or in PubNub admin portal |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full burden. It reveals that plain strings are auto-wrapped in a 'text' field, a useful detail. But it lacks disclosure of side effects (e.g., message delivery guarantees), error conditions, rate limits, or idempotency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two concise sentences: first states purpose and types, second adds key requirement and behavior nuance. No wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Core behavior is covered: sending messages with key requirements and type differentiation. Missing details on response format or error handling, but given no output schema, the description is mostly adequate.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so baseline is 3. Description adds value by explaining auto-wrapping of plain strings for the message parameter, and notes keys requirement beyond schema descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool sends messages or signals to PubNub channels in real-time, and distinguishes between regular messages and lightweight signals. This differentiates it from sibling tools like get_pubnub_messages (retrieval) and subscribe_and_receive_pubnub_messages (receiving).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description mentions the requirement for publish and subscribe keys and hints at obtaining them via manage_keysets tool. However, it does not specify when to use signals vs messages, nor does it exclude alternative tools for similar tasks.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
subscribe_and_receive_pubnub_messagesSubscribe to PubNub Channel and Receive MessagesA
Subscribe to a PubNub channel and receive messages in real-time. Specify the number of messages (default 1) and/or a timeout (default 10s, max 30s) to wait for. Requires publish and subscribe keys from your PubNub keyset.
| Name | Required | Description | Default |
|---|---|---|---|
| channel | Yes | Channel ID to subscribe to and receive messages from | |
| messageCount | No | Number of messages to wait for before unsubscribing (default: 1 message) | |
| timeout | No | Maximum timeout in seconds. If not all messages are received within this time, the subscription will end (default: 10 seconds, max 30 seconds) | |
| publishKey | Yes | Publish Key that can be obtained from your keyset by manage_keysets tool with parameter operation list or in PubNub admin portal | |
| subscribeKey | Yes | Subscribe Key that can be obtained from your keyset by manage_keysets tool with parameter operation list or in PubNub admin portal |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Without annotations, the description discloses the subscription behavior and defaults for messageCount and timeout. However, it does not explain blocking behavior, how messages are returned, or the unsubscription process.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is three sentences with no fluff. It front-loads the main purpose and adds essential details efficiently.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema, the description does not explain the return format, which is a minor gap. However, for a real-time subscription tool, the return is somewhat implied. It covers all parameters and gives usage hints.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so baseline is 3. The description adds value by specifying default values for messageCount and timeout, max timeout, and the source for keys (manage_keysets tool), going beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Subscribe to a PubNub channel and receive messages in real-time', providing a specific verb and resource. It distinguishes from sibling tools like get_pubnub_messages and send_pubnub_message.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description mentions the prerequisite of publish and subscribe keys, which helps in usage context. However, it lacks explicit guidance on when to use this tool versus alternatives like get_pubnub_messages.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
write_pubnub_appGet PubNub Best PracticesA
Retrieve PubNub best practices guide covering: 1) Architecture & project setup (environments, payload sizes), 2) Security (Access Manager tokens, least privilege, PII hygiene), 3) Channel & data modeling (naming conventions, message schemas), 4) Publish/Subscribe patterns, 5) History usage, 6) Client reliability (reconnect, idempotency, ordering), 7) Functions/edge logic, 8) Presence & state, 9) App Context, 10) Mobile specifics (push notifications, caching), 11) Web specifics (tab lifecycle, Service Workers), 12) Observability & ops, 13) Performance & cost optimization. Call this tool when building PubNub applications to ensure robust, scalable, and secure implementations.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It implies a read-only operation (retrieving a guide) but does not explicitly state behavioral traits such as being non-destructive or requiring authentication. The name mismatch adds ambiguity.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with a clear first sentence and a numbered list of topics. However, the list is lengthy (13 items) and could be more concise. The front-loading is effective.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no parameters or output schema, the description sufficiently explains what the tool returns—a comprehensive best practices guide. The list of topics provides adequate completeness for an agent to decide when to use it.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has no parameters, and the input schema is fully covered (100%). With zero parameters, the description need not explain them, and it provides sufficient context for the tool's function.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool retrieves a PubNub best practices guide with a detailed list of topics. However, the tool name 'write_pubnub_app' contradicts the retrieval action, causing potential confusion. Despite the name, the purpose is well-defined.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description mentions calling this tool when building PubNub applications for robust, scalable, and secure implementations. This provides usage context but lacks explicit guidance on when not to use it or how it differs from sibling tools like get_sdk_documentation.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
16 tool updates
v2.3.4- Added
get_chat_sdk_documentation - Added
get_general_migration_guide - Added
get_pubnub_messages - Added
get_pubnub_presence - Added
get_sdk_documentation - Added
get_sdk_migration_guide - Added
get_usage_metrics - Added
how_to - Added
insights - Added
manage_app_context - Added
manage_apps - Added
manage_illuminate - Added
manage_keysets - Added
send_pubnub_message - Added
subscribe_and_receive_pubnub_messages - Added
write_pubnub_app
11 tool updates
v2.3.2- Removed
get_pubnub_messages - Removed
get_pubnub_presence - Removed
manage_pubnub_account - Removed
publish_pubnub_message - Removed
pubnub_app_context - Removed
pubnub_subscribe_and_receive_messages - Removed
read_pubnub_chat_sdk_docs - Removed
read_pubnub_resources - Removed
read_pubnub_sdk_docs - Removed
signal_pubnub_message - Removed
write_pubnub_app
11 tool updates
v1.0.0- First observed
get_pubnub_messages - First observed
get_pubnub_presence - First observed
manage_pubnub_account - First observed
publish_pubnub_message - First observed
pubnub_app_context - First observed
pubnub_subscribe_and_receive_messages - First observed
read_pubnub_chat_sdk_docs - First observed
read_pubnub_resources - First observed
read_pubnub_sdk_docs - First observed
signal_pubnub_message - First observed
write_pubnub_app
TDQS
Scored across 16 tools
The set includes multiple documentation tools (get_sdk_documentation, get_chat_sdk_documentation, how_to, write_pubnub_app, get_sdk_migration_guide, get_general_migration_guide) with clear usage guidance, so overlap is managed. However, manage_illuminate is an extremely dense mega-tool that conflates many distinct operations (list, create, update, delete, activate, etc.) into one tool, making it hard for an agent to select the right tool vs. sub-operation. Also, get_usage_metrics and insights both query analytics, with overlapping scopes that could confuse selection.
Names mix patterns: some use verb_object (write_pubnub_app, send_pubnub_message, get_pubnub_messages, get_pubnub_presence), some use noun-ish (insights, how_to, manage_app_context, manage_illuminate). The 'manage_' prefix is used for some but not consistently (manage_keysets, manage_app_context, manage_illuminate, manage_apps vs. get_usage_metrics, insights). The documentation tools vary wildly: get_sdk_documentation, get_chat_sdk_documentation, get_sdk_migration_guide, get_general_migration_guide, how_to, write_pubnub_app — there's no common prefix for docs.
16 tools is slightly above the typical ideal range (3-15), but given the broad scope of PubNub (real-time messaging, admin, analytics, docs), it remains reasonable. Each tool covers a distinct domain, though manage_illuminate is overloaded and could arguably be split into multiple tools to reduce the count's weight.
The core real-time messaging lifecycle is covered (publish, subscribe, history, presence), and admin operations (apps, keysets, usage metrics) are present. However, missing common operations like channel management (create/delete channels) or access manager token generation, which are essential for many PubNub applications, represent notable gaps. Illuminate is very comprehensive, but the analytics side is read-only and lacks write/alerting tools.
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
The Telnyx MCP server is an official implementation of the Model Context Protocol that enables AI clients (like Claude Desktop, Cursor, and OpenAI Agents) to interact with Telnyx's telephony, messaging, and AI assistant APIs. It provides comprehensive capabilities including making and managing phone calls, sending SMS/MMS messages, purchasing and configuring phone numbers, creating AI assistants with custom instructions, managing cloud storage buckets, scraping and embedding website content, and handling integration secrets. The server exists as both a local implementation and a remotely hosted version, allowing developers to integrate real-world communication infrastructure directly into AI applications.
Real-time chat hub for AI agents — Claude Code, Cursor, Cline, Codex over MCP or REST.
A Model Context Protocol server for Wix AI tools
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables AI assistants to explore and interact with Cursor IDE's SQLite databases, providing access to project data, chat history, and composer information.25-
- FlicenseNot gradedqualityDmaintenanceA customized MCP server that enables integration between LLM applications and documentation sources, providing AI-assisted access to LangGraph and Model Context Protocol documentation.-
- AlicenseBqualityDmaintenanceA Model Context Protocol server that loads multiple OpenAPI specifications and exposes them to LLM-powered IDE integrations, enabling AI to understand and work with your APIs directly in development tools like Cursor.737 npm90MIT
- AlicenseCqualityCmaintenanceA Model Context Protocol server that enables intelligent searching across documentation for 30+ programming libraries and frameworks, fetching relevant information from official sources.238MIT