Skip to main content

ToolKind

Enum ToolKind 

Source
pub enum ToolKind {
    Mcp,
    Builtin,
    Composio,
    App,
    CoreApi,
    Command,
    Skill,
}
Expand description

Source plane of a catalog entry. Serializes lowercase: mcp|builtin|composio|app, plus core-api for Core’s own HTTP endpoints exposed as agent-drivable tools, command for a declarative app tool that execs an allowlisted local CLI, and skill for an Agent Skill.

§Skill is the one kind that is not callable

Every other variant names a function the model may invoke. ToolKind::Skill names instruction text the model may load — an Agent Skill discovered through the same catalog so a model faces one search door instead of two, but reached with skills__load rather than by calling its id. The kind is the model’s (and the gateway’s) signal for that distinction: Core’s McpRegistry::describe points a skill row at skills__load, the gateway declines to inject skill rows as function definitions, and Core’s skills provider refuses a call that names a skill id as a tool. Discovery is unified; execution is not.

Variants§

§

Mcp

§

Builtin

§

Composio

§

App

§

CoreApi

A Core HTTP endpoint (OpenAPI-derived) callable by an agent over loopback. Explicit rename so the wire value is the hyphenated core-api, not the rename_all = "lowercase" default coreapi.

§

Command

A declarative command app tool: execs an allowlisted local CLI through the governed tool-exec path. Surfaced as its own kind so ?kind=command selects these; the other app backends (http/inline_deno/alias) stay App.

§

Skill

An Agent Skill: instruction text loaded with skills__load, not a callable function. Ids are namespaced skills__<slug> so a skill row lives in the same id space as the skills__* tools that serve it — which is what makes the allowlist arm below, and Core’s refusal path, work without a bespoke lookup.

Implementations§

Source§

impl ToolKind

Source

pub const ALL: &'static [ToolKind]

Every variant, in wire order — the single list both gateway mirrors and Core’s ACP bridge enumerate when asserting that their advertised tool_search.kind enum covers every plane Core can filter on.

Adding a variant means adding it here. ToolKind::wire_name below is a wildcard-free match, so a new variant is a compile error there first; this constant is two lines above it precisely so the same edit updates both. A variant present in the enum but missing from ALL would make those mirror tests pass vacuously — the exact failure mode that let core-api and command stay invisible to every model for two releases.

Source

pub const fn wire_name(self) -> &'static str

The canonical wire spelling — the value ToolKind::parse_filter round-trips and the one a ?kind= / tool_search.kind filter must use.

Exhaustive with no wildcard arm on purpose: that is the drift alarm. See ToolKind::ALL.

Source

pub fn parse_filter(s: &str) -> Option<ToolKind>

Parse the ?kind= / tool_search.kind value. anyNone (no filter); an unknown value also yields None so callers can treat it as “any”.

Trait Implementations§

Source§

impl Clone for ToolKind

Source§

fn clone(&self) -> ToolKind

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for ToolKind

Source§

impl Debug for ToolKind

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for ToolKind

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for ToolKind

Source§

impl PartialEq for ToolKind

Source§

fn eq(&self, other: &ToolKind) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for ToolKind

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for ToolKind

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.