eval_form
Evaluate Clojure code in a specified or current namespace using the nREPL MCP Server. Supports code execution, namespace switching, file loading, and function definition, ideal for dynamic Clojure development and testing.
Instructions
Evaluate Clojure code in a specific namespace or the current one. Examples:
- Get current namespace: (eval_form {:code "(str ns)"})
- Change namespace: (eval_form {:code "(+ 1 2)" :ns "my.namespace"})
- Load a file: (eval_form {:code "(load-file "src/my_file.clj")"})
- Define and call functions: (eval_form {:code "(defn add [a b] (+ a b))" :ns "math"} then (eval_form {:code "(add 1 2)" :ns "math"})
Input Schema
Name | Required | Description | Default |
---|---|---|---|
code | Yes | Clojure code to evaluate | |
ns | No | Optional namespace to evaluate in. Changes persist for subsequent evaluations. |
Input Schema (JSON Schema)
You must be authenticated.
Other Tools from nREPL MCP Server
Related Tools
- @JohanCodinha/nrepl-mcp-server
- @JohanCodinha/nrepl-mcp-server
- @Bigsy/Clojars-MCP-Server
- @opensensor/bn_cline_mcp
- @opensensor/bn_cline_mcp