Function: claude-code-ide--tool-format-p

claude-code-ide--tool-format-p is a natively compiled function defined in claude-code-ide-mcp-server.el.

Signature

(claude-code-ide--tool-format-p TOOL-SPEC)

Documentation

Determine format of TOOL-SPEC.

Returns old for (symbol . plist) format, new for plist format.

Source Code

;; Defined in /nix/store/yjvbhwl7p6zrbw9xlnni7y4hra8sa3pl-emacs-packages-deps/share/emacs/site-lisp/claude-code-ide-mcp-server.el
;;; Format Detection and Conversion

(defun claude-code-ide--tool-format-p (tool-spec)
  "Determine format of TOOL-SPEC.
Returns `old' for (symbol . plist) format, `new' for plist format."
  (cond
   ;; Old format: (function-symbol :description "..." :parameters ...)
   ((and (consp tool-spec)
         (symbolp (car tool-spec))
         (not (keywordp (car tool-spec))))
    'old)
   ;; New format: (:function fn :name "..." :description "..." :args ...)
   ((and (listp tool-spec)
         (keywordp (car tool-spec)))
    'new)
   (t
    (error "Unknown tool format: %S" tool-spec))))