@@ -200,6 +200,8 @@ The generated prompt will include the function/region scope, visible file list,
200200
201201AI Code includes an Emacs MCP server with these core built-in tools:
202202- =project_info=: summarize the current project, active buffer, and file count
203+ - =editor_state=: inspect the currently selected buffer, point, mode, region, and buffer flags
204+ - =visible_buffers=: list the buffers visible in the selected frame windows
203205- =buffer_query=: read buffer contents, optionally by line range
204206- =get_diagnostics=: return Flycheck or Flymake diagnostics for one file or open project buffers
205207- =get_project_files=: list regular files in the current project
@@ -223,25 +225,20 @@ When enabled, AI Code also registers:
223225- =get_feature_load_state=: inspect whether an Emacs feature is loaded and where it comes from
224226- =get_recent_messages=: return the latest lines from =*Messages*=
225227- =get_last_error_backtrace=: return the most recently recorded Emacs command error snapshot
228+ - =eval_elisp=: evaluate a single Emacs Lisp form in a chosen buffer context when explicitly enabled
226229
227230This split keeps the MCP core small while still exposing debugging-oriented tools by default.
228231
229- Optional editor-session tools are available when you explicitly enable them :
232+ By default, =eval_elisp= is not registered. To opt in explicitly :
230233
231234#+begin_src emacs-lisp
232- (setq ai-code-mcp-editor -tools-enabled t)
235+ (setq ai-code-mcp-debug -tools-enable-eval-elisp t)
233236#+end_src
234237
235- When enabled, AI Code also registers:
236- - =editor_state=: inspect the currently selected buffer, point, mode, region, and buffer flags
237- - =visible_buffers=: list the buffers visible in the selected frame windows
238- - =messages_tail=: return the latest lines from =*Messages*=
239- - =eval_elisp=: evaluate a single Emacs Lisp form in a chosen buffer context
240-
241238By default, =eval_elisp= only allows =query= mode. To allow editor-local side effects too, opt in explicitly:
242239
243240#+begin_src emacs-lisp
244- (setq ai-code-mcp-editor -tools-allow-effect-eval t)
241+ (setq ai-code-mcp-debug -tools-allow-effect-eval t)
245242#+end_src
246243
247244screenshot inside Codex cli:
0 commit comments