Helper Functions
Create a DataMap for a straightforward single-endpoint API call with minimal configuration.
Parameters
name
Function name.
url
API endpoint URL.
response_template
Template string for formatting the response.
parameters
Parameter definitions. Keys are parameter names, values are dicts with
"type", "description", and optional "required" keys.
method
HTTP method.
headers
HTTP headers.
body
Request body for POST/PUT.
error_keys
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
Dictionary mapping test values to (pattern, [FunctionResult][ref-functionresult]) tuples.
parameters
Parameter definitions (same format as create_simple_api_tool).
Returns
DataMap — A fully configured DataMap.