run_slop
Run a SLOP script to chain MCP tool calls, transform data, and persist state across executions.
Instructions
Execute SLOP script with access to all registered MCPs. Inline script or file path. Returns final expression value as text.
Call MCP tools as mcp_name.tool_name(param: value). Example patterns:
Chain results between tools: data = api.fetch(id: 42) summary = ai.summarize(text: data["content"]) emit(summary)
Loop and collect: results = [] for id in [1, 2, 3]: results = results + [api.get(id: id)] emit(items: results, count: len(results))
Transform with builtins: repos = github.search(query: "mcp") names = map(repos, |r| r["name"]) emit(join(names, "\n"))
Pipe for chaining transforms (left value becomes first arg): [1, 2, 3, 4, 5] | filter(|x| x > 2) | map(|x| x * 10) data | json_stringify()
Session memory persists across run_slop calls (thread-safe): store_set("key", value) prev = store_get("key")
Persistent memory survives restarts (disk-backed): mem_save("bank", "key", value, description: "what this stores") data = mem_load("bank", "key") entries = mem_list("bank") matches = mem_search("query")
Use recipe parameter: recipe: "list" to see available templates, recipe: "" to load one. Use slop_reference to browse built-in functions (map, filter, reduce, json_parse, regex_match, etc.).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| script | No | Inline SLOP script | |
| file_path | No | Path to .slop file | |
| recipe | No | Embedded recipe: 'list' to enumerate, or recipe name to load |