pub const MAX_MCP_TOOL_PREFIX_BYTES: usize = 32;Expand description
Maximum byte length of a configured McpConfig::tool_prefix.
UTF-8 bytes, not chars – but since ToolPrefix’s charset is
ASCII-only, bytes and chars coincide here. Chosen well under rmcp’s
128-byte SHOULD-level tool name limit (joined = prefix + '_' + tool_name), and conservatively under stricter tool-name limits some LLM
client APIs have historically enforced (e.g. ^[a-zA-Z0-9_-]{1,64}$),
so a prefix accepted here is unlikely to be rejected downstream by the
client. See mcp::server::MAX_TOOL_NAME_BYTES for the compile-time proof
tying this constant to the longest currently-registered tool name.