Function: mcp--parse-tool-call-result
mcp--parse-tool-call-result is a natively compiled function defined in
mcp.el.
Signature
(mcp--parse-tool-call-result RES)
Documentation
Parse the result of a tool call from RES.
RES is a plist representing the tool call result.
The function extracts text content from the result, concatenating it into a single string if multiple text entries are present.
Returns the concatenated text or nil if no text content is found.
Source Code
;; Defined in /nix/store/5m747x13pb1ddrvbq9raj91c4q1h1kl0-emacs-packages-deps/share/emacs/site-lisp/elpa/mcp-20260615.940/mcp.el
(defun mcp--parse-tool-call-result (res)
"Parse the result of a tool call from RES.
RES is a plist representing the tool call result.
The function extracts text content from the result, concatenating it into
a single string if multiple text entries are present.
Returns the concatenated text or nil if no text content is found."
(string-join
(cl-remove-if #'null
(mapcar (lambda (content)
(when (string= "text" (plist-get content :type))
(plist-get content :text)))
(plist-get res :content)))
"\n"))