Helper Functions
Create a DataMap for a straightforward single-endpoint API call with minimal configuration.
Parameters
name
Function name.
url
API endpoint URL.
responseTemplate
Template string for formatting the response.
parameters
Parameter definitions. Keys are parameter names, values are objects with
"type", "description", and optional "required" keys.
method
HTTP method.
headers
HTTP headers.
body
Request body for POST/PUT.
errorKeys
Keys indicating an error response.
Returns
DataMap — A fully configured DataMap ready for further chaining or conversion.
Create a DataMap for pattern-matching responses without API calls.
Parameters
name
Function name.
patterns
Object mapping test values to [pattern, FunctionResult] tuples.
parameters
Parameter definitions (same format as createSimpleApiTool).
Returns
DataMap — A fully configured DataMap.