Function: mcp-async-get-prompt
mcp-async-get-prompt is a natively compiled function defined in
mcp.el.
Signature
(mcp-async-get-prompt CONNECTION NAME ARGUMENTS CALLBACK ERROR-CALLBACK)
Documentation
Async Call a prompt on the remote CONNECTION with NAME and ARGUMENTS.
CONNECTION is the MCP connection object. NAME is the name of the prompt to call. ARGUMENTS is a list of arguments to pass to the prompt. CALLBACK is a function to call on successful response. ERROR-CALLBACK is a function to call on error.
Source Code
;; Defined in /nix/store/5m747x13pb1ddrvbq9raj91c4q1h1kl0-emacs-packages-deps/share/emacs/site-lisp/elpa/mcp-20260615.940/mcp.el
(defun mcp-async-get-prompt (connection name arguments callback error-callback)
"Async Call a prompt on the remote CONNECTION with NAME and ARGUMENTS.
CONNECTION is the MCP connection object.
NAME is the name of the prompt to call.
ARGUMENTS is a list of arguments to pass to the prompt.
CALLBACK is a function to call on successful response.
ERROR-CALLBACK is a function to call on error."
(jsonrpc-async-request connection
:prompts/get
(list :name name
:arguments (if arguments
arguments
#s(hash-table)))
:timeout (mcp--timeout connection)
:success-fn
(lambda (res)
(funcall callback res))
:error-fn
(jsonrpc-lambda (&key code message _data)
(funcall error-callback code message))))