Skip to main content
Glama

Get PubNub Best Practices

write_pubnub_app

Build PubNub applications using best practices for architecture, security, channel modeling, and publish/subscribe patterns to ensure robust, scalable, and secure implementations.

Instructions

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/5

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.

Conciseness3/5

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.

Completeness4/5

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.

Parameters4/5

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.

Purpose4/5

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.

Usage Guidelines3/5

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.

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