Skip to main content
Glama

Get PubNub Channel History

get_pubnub_messages

Retrieve historical messages from PubNub channels with timetoken pagination. Returns message content and metadata in JSON.

Instructions

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
channelsYesList of channel names to fetch history from
startNoTimetoken delimiting the start (exclusive) of the time slice to pull messages from
endNoTimetoken delimiting the end (inclusive) of the time slice to pull messages from
countNoNumber of historical messages to return per channel
publishKeyYesPublish Key that can be obtained from your keyset by manage_keysets tool with parameter operation list or in PubNub admin portal
subscribeKeyYesSubscribe Key that can be obtained from your keyset by manage_keysets tool with parameter operation list or in PubNub admin portal
Behavior4/5

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.

Conciseness5/5

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.

Completeness4/5

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.

Parameters3/5

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.

Purpose5/5

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.

Usage Guidelines3/5

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.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/pubnub/pubnub-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server