PyGen toolset
The PyGen toolset provides read-only access to the Snaps catalog (including Snap definitions, parameters, documentation, and usage examples) for text-to-pipeline generation. Call these tools from an MCP client to look up available Snaps, query usage examples, retrieve Snap parameters and documentation, and validate pipeline designs before building them.
All PyGen toolset endpoints share the base path
/api/1/rest/public/platform_mcp/mcp/pygen.
Important: The PyGen tools return Snap definitions and pipeline structures in
SLPy format, SnapLogic's Python-based pipeline representation. Your MCP client or
agent must have SLPy knowledge to interpret and use this output. If your agent is not
SLPy-aware (for example, through the SnapCode integration), the PyGen toolset will return
data it cannot act on.
Note: The PyGen toolset is available only when PyGen is configured for
the environment. If
/mcp/pygen returns 404 or
/mcp exposes only 36 tools, PyGen is not wired for that
environment.Note: PyGen tool calls are not audit-logged. These tools perform
read-only queries against the Snap catalog and do not modify any platform
resources.
| PyGen toolset APIs | |
|---|---|
POST
/platform_mcp/mcp/pygen
|
sends a JSON-RPC 2.0 request to the Platform MCP Server using the PyGen toolset and returns the response as a Server-Sent Events (SSE) stream. |
GET
/platform_mcp/mcp/pygen
|
opens a persistent Server-Sent Events (SSE) stream for receiving server-initiated messages from the SnapLogic MCP Server on the PyGen toolset. |
DELETE
/platform_mcp/mcp/pygen
|
terminates an active PyGen toolset MCP session and releases any associated server-side resources. |
Available tools
After initializing a session, call tools/list to retrieve the
live set of tools. The following 9 tools are available in the PyGen toolset:
| Tool name | Description | Inputs |
|---|---|---|
pygen_get_all_snap_names |
Return a list of all Snap names available in the SnapLogic catalog. | None. |
pygen_list_snaps_by_category |
Return Snap names filtered by category, pack, or both. |
|
pygen_query_snap_examples |
Search for Snap usage examples by natural-language query. |
|
pygen_query_pipeline_examples |
Retrieve example pipelines matching a query. Accepts a single query string or a list of up to 2 query strings; results are merged, deduplicated, and re-ranked. |
|
pygen_validate_snap_names |
Returns valid names, fuzzy corrections, and Snap I/O metadata. |
|
pygen_get_snap_parameters |
Retrieve the configurable parameter schema for one or more Snaps. |
|
pygen_get_snap_documentation |
Retrieve the documentation text for one or more Snaps, including description and field-level help. |
|
pygen_get_snap_io_info |
Retrieve the input and output schema for one or more Snaps. |
|
pygen_validate_connections |
Validate Snap connections in a SLPy code string. Input is a
skeleton SLPy string with Pipeline(), Snap
declarations, and p.connect([...]) syntax. |
|