Get Scripted Decision Node Bindings
getScriptedDecisionNodeBindingsRetrieve available bindings, functions, and import libraries for Scripted Decision Node scripts. Essential reference for writing journey scripts in PingOne Advanced Identity Cloud.
Instructions
Retrieve the available bindings (variables, functions) and allowed import libraries for Scripted Decision Node scripts. This is essential reference information when writing journey scripts - it shows what APIs and classes are available in the scripting environment.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| realm | Yes | The realm to query |
Implementation Reference
- The tool handler function that executes the logic: makes an authenticated GET request to the AM realm's SCRIPTED_DECISION_NODE context endpoint and returns the bindings data.
export const getScriptedDecisionNodeBindingsTool = { name: 'getScriptedDecisionNodeBindings', title: 'Get Scripted Decision Node Bindings', description: 'Retrieve the available bindings (variables, functions) and allowed import libraries for Scripted Decision Node scripts. This is essential reference information when writing journey scripts - it shows what APIs and classes are available in the scripting environment.', scopes: SCOPES, annotations: { readOnlyHint: true, openWorldHint: true }, inputSchema: { realm: z.enum(REALMS).describe('The realm to query') }, async toolFunction({ realm }: { realm: string }) { try { const url = buildAMRealmUrl(realm, 'contexts/SCRIPTED_DECISION_NODE'); const { data, response } = await makeAuthenticatedRequest(url, SCOPES, { method: 'GET', headers: AM_SCRIPT_HEADERS_V2 }); return createToolResponse(formatSuccess(data, response)); } catch (error: any) { return createToolResponse(`Failed to get scripted decision node bindings in realm "${realm}": ${error.message}`); } } }; - Input schema using Zod enum validator for the 'realm' parameter.
inputSchema: { realm: z.enum(REALMS).describe('The realm to query') }, - src/tools/am/index.ts:15-15 (registration)The tool is re-exported from the AM tools index barrel file, making it available via amTools in toolHelpers.ts.
export { getScriptedDecisionNodeBindingsTool } from './getScriptedDecisionNodeBindings.js'; - src/index.ts:27-43 (registration)Tools are registered with the MCP server via getAllTools() iteration in src/index.ts. All AM tools (including getScriptedDecisionNodeBindings) are collected by toolHelpers.ts and registered here.
allTools.forEach((tool) => { const toolConfig: ToolConfig = { title: tool.title, description: tool.description }; // Only add inputSchema if it exists (some tools like getLogSources don't have one) if ('inputSchema' in tool && tool.inputSchema) { toolConfig.inputSchema = tool.inputSchema; } // Add annotations if present if ('annotations' in tool && tool.annotations) { toolConfig.annotations = tool.annotations; } server.registerTool(tool.name, toolConfig, tool.toolFunction as any); - src/utils/toolHelpers.ts:27-33 (helper)The tool is conditionally included in the allTools array (excluded in Docker mode).
if (!isDockerMode) { tools.push(...(Object.values(amTools) as Tool[])); tools.push(...(Object.values(applicationTools) as Tool[])); } return tools; }