Skip to main content
Glama

run_slop

Execute SLOP scripts to orchestrate MCP tools, chain results, loop, transform data, and use persistent memory. Run inline scripts or load from file.

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

TableJSON Schema
NameRequiredDescriptionDefault
recipeNoEmbedded recipe: 'list' to enumerate, or recipe name to load
scriptNoInline SLOP script
file_pathNoPath to .slop file

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.15.0
  2. Removedv0.14.5
  3. First observedv0.0.0

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It discloses that the tool executes scripts with access to all MCPs, returns the final expression value, and provides session (thread-safe) and persistent (disk-backed) memory features. It does not explicitly warn about potential side effects from calling external tools, but the examples make it clear the script can invoke any MCP tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is long but well-structured, with sections for chaining, loops, transforms, pipes, memory, and recipes. Every sentence serves a purpose—examples are essential for a scripting language tool. While it could be slightly tightened, the structure and front-loading of the main purpose make it effective.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (arbitrary script execution with MCP access) and the absence of an output schema, the description is complete: it states the return format, covers memory persistence, recipe usage, and provides syntax examples. It addresses everything an agent needs to invoke it correctly, including edge cases like recipe listing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, and the description adds substantial meaning beyond the schema. It explains the recipe parameter ('list' to enumerate, name to load), illustrates inline script usage with syntax, and clarifies file_path is a path to a .slop file. The detailed examples for script and recipe usage far exceed what the schema provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Execute SLOP script with access to all registered MCPs. Inline script or file path. Returns final expression value as text.' It distinguishes itself from siblings like execute_tool (single tool execution) and slop_help/slop_reference (reference/help) by focusing on multi-step scripting.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context on when to use the tool—for executing SLOP scripts, chaining MCP calls, loops, and transforms—and gives extensive examples. It also mentions using slop_reference for built-in functions, but does not explicitly state when NOT to use it (e.g., for single tool calls, execute_tool might be preferable). This is implied but not stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.