Skip to main content
Glama

Manage PubNub Illuminate

manage_illuminate

Manage PubNub Illuminate resources: create, update, delete Business Objects, Metrics, Queries, Decisions, and Dashboards, plus activate, deactivate, and test with fake data.

Instructions

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
resourceNoThe 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.
operationYesOperation 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.
idNoResource UUID. Required for: get, update, delete, activate, deactivate, get-fields, execute-adhoc.
dataNoRequest 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_keyNoPubNub subscribe key (sub-c-...). Required for business-object activate and publish-fake-data. Obtain via manage_keysets with operation list.
publish_keyNoPubNub publish key (pub-c-...). Required for publish-fake-data. Obtain via manage_keysets with operation list.
secret_keyNoPubNub 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_keyNoPubNub 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_idNoBusiness Object UUID. Required for: publish-fake-data, raw-snapshot, aggregate, field-health.
query_idNoSaved query UUID. Required for verify-query.
decision_idNoDecision UUID. Required for check-action-log.
scenarioNoFake-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.
countNoNumber of fake messages to publish (1–50). Defaults to 5.
user_idNoSpecific user ID to use for chat-flooding and cross-posting scenarios.
channelNoSpecific channel for generic/chat-flooding publish.
limitNoMax rows to return for raw-snapshot, aggregate, field-health (1–500). Defaults to 50.
group_byNoField names to group by for the aggregate operation (e.g. ['userId', 'channel']). Defaults to the first two TEXT fields found in the Business Object.
pipelineNoFull 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.
Behavior5/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 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.

Conciseness3/5

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.

Completeness5/5

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.

Parameters4/5

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.

Purpose5/5

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.

Usage Guidelines4/5

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.

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