pub enum ToolKind {
Show 15 variants
Hover,
Definition,
TypeDefinition,
Implementation,
References,
Diagnostics,
Rename,
Completions,
SignatureHelp,
DocumentSymbols,
WorkspaceSymbols,
FormatDocument,
CodeActions,
CallHierarchy,
InlayHints,
}Expand description
A routable MCP tool: every MCP tool that dispatches a request to a
specific LSP server via ToolRouter.
Cache-only tools (get_cached_diagnostics, get_server_logs,
get_server_messages) are deliberately excluded — they never reach a
client directly, so they have nothing to route.
CallHierarchy covers prepare, incoming_calls, and outgoing_calls
as a single route: the opaque item returned by prepare is only
meaningful to the server that produced it, and the incoming/outgoing
handlers never call ensure_open themselves — they rely on prepare
having already synced the document to the same server.
§Examples
use mcpls_core::config::ToolKind;
assert_eq!(ToolKind::Hover.as_str(), "hover");
assert_eq!(ToolKind::ALL.len(), 15);Variants§
Hover
textDocument/hover.
Definition
textDocument/definition.
TypeDefinition
textDocument/typeDefinition.
Implementation
textDocument/implementation.
References
textDocument/references.
Diagnostics
textDocument/diagnostic (pull) and the publishDiagnostics cache filter.
Rename
textDocument/rename.
Completions
textDocument/completion.
SignatureHelp
textDocument/signatureHelp.
DocumentSymbols
textDocument/documentSymbol.
WorkspaceSymbols
workspace/symbol.
FormatDocument
textDocument/formatting.
CodeActions
textDocument/codeAction.
CallHierarchy
textDocument/prepareCallHierarchy, callHierarchy/incomingCalls, callHierarchy/outgoingCalls.
InlayHints
textDocument/inlayHint.
Implementations§
Trait Implementations§
impl Copy for ToolKind
Source§impl<'de> Deserialize<'de> for ToolKind
impl<'de> Deserialize<'de> for ToolKind
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for ToolKind
impl StructuralPartialEq for ToolKind
Auto Trait Implementations§
impl Freeze for ToolKind
impl RefUnwindSafe for ToolKind
impl Send for ToolKind
impl Sync for ToolKind
impl Unpin for ToolKind
impl UnsafeUnpin for ToolKind
impl UnwindSafe for ToolKind
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.