pub struct CategorizedTool {
pub name: String,
pub category: String,
pub keywords: String,
pub short_description: String,
}Expand description
A tool with categorization metadata from Claude.
Claude analyzes the tool’s purpose and provides:
- A category for grouping related tools
- Keywords for discovery via grep/search
- A concise description for file headers
Fields§
§name: StringOriginal tool name (must match introspected tool).
Capped at MAX_CATEGORIZED_TOOL_NAME_LEN (128 bytes) at runtime; mirrored here as a
literal since schemars attributes cannot reference a const. Note: JSON Schema’s
maxLength counts Unicode code points, not bytes, so the two bounds only coincide
exactly for ASCII input — for legitimate multi-byte UTF-8 text, the runtime byte check
can reject a string the declared schema would still accept (never the reverse), since
bytes-per-char >= 1 (issue #198 M2).
category: StringCategory assigned by Claude (e.g., “issues”, “repos”, “users”).
Capped at MAX_CATEGORY_LEN (100 bytes) at runtime; mirrored here as a literal since
schemars attributes cannot reference a const. See CategorizedTool::name’s doc
comment for the bytes-vs-characters caveat.
keywords: StringComma-separated keywords for discovery.
Capped at MAX_KEYWORDS_LEN (500 bytes) at runtime; mirrored here as a literal since
schemars attributes cannot reference a const. See CategorizedTool::name’s doc
comment for the bytes-vs-characters caveat.
short_description: StringConcise description (max 80 chars) for header comment.
Capped at MAX_SHORT_DESCRIPTION_LEN (320 bytes — 4x the 80-char target, headroom for
multi-byte UTF-8) at runtime; mirrored here as a literal since schemars attributes
cannot reference a const. See CategorizedTool::name’s doc comment for the
bytes-vs-characters caveat.
Trait Implementations§
Source§impl Clone for CategorizedTool
impl Clone for CategorizedTool
Source§fn clone(&self) -> CategorizedTool
fn clone(&self) -> CategorizedTool
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CategorizedTool
impl Debug for CategorizedTool
Source§impl<'de> Deserialize<'de> for CategorizedTool
impl<'de> Deserialize<'de> for CategorizedTool
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>,
Source§impl JsonSchema for CategorizedTool
impl JsonSchema for CategorizedTool
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more