Plug Database Advanced icon

Plug Database Advanced

Run Plug Database commands over REST or Socket.

SQL → Discover RPC

AI-generated

Summary

Discover available RPC methods and metadata from a Plug SQL agent using either REST or socket communication channels, allowing optional customization of request parameters and response formatting.

Inputs

  • Channel — Selects the communication channel for the RPC discovery command, either 'REST' or 'Socket'. Defaults to 'REST'.
  • Input Mode — Chooses between 'Guided' mode for simplified input or 'Advanced' mode for providing a full JSON-RPC command. Defaults to 'Guided'.
  • Discover Params JSON — A JSON string representing optional parameters sent to the rpc.discover command, only applicable in 'Guided' input mode. Leave empty to omit parameters.
  • Raw JSON-RPC Command (required) — The full JSON-RPC command object to send, used only in 'Advanced' input mode. The client token is auto-injected when supported.
  • Response Mode — Determines how the response is returned to n8n, with options for aggregated JSON, chunked items from socket streams, or raw JSON-RPC envelope for debugging. Defaults to 'Aggregated JSON'.
  • Agent ID — Optionally override the target Plug agent ID; if left empty, defaults to the agent ID configured in credentials.
  • Client Token — Optionally override the Plug client token; if empty, defaults to the client token from credentials.
  • Include Plug Metadata — Boolean flag to include internal Plug metadata in the output to aid debugging or inspection. Defaults to true.
  • Additional Options — A collection of optional settings such as timeout in milliseconds for the command, API version override, and a JSON object to merge into the command metadata when using guided mode.
  • Socket Options — When using the socket channel, optional configuration for buffering limits and stream pull window size.

Output shape

a list of items representing the discovered RPC methods and metadata or a raw JSON-RPC envelope depending on response mode

The output format varies based on the selected Response Mode: 'Aggregated JSON' returns parsed structured items for ease of use, 'Chunk Items' streams items useful for socket SQL streams, and 'Raw JSON-RPC' returns the raw normalized JSON-RPC response for advanced use or debugging. The included metadata can be toggled and optional timeouts and API versioning affect the request execution.

Examples

Example 1: Discover RPC methods via REST with default guided input

Channel set to REST, input mode guided with default discover parameters, aggregated JSON response, default agent and client token from credentials.

Example 2: Send a custom discover RPC command with advanced input mode over socket

Channel set to Socket, input mode advanced with a raw JSON-RPC command string, response mode raw JSON-RPC, specifying agent ID and client token overrides and socket buffering options.

Links

Discussion