Documentation
¶
Overview ¶
Package namespace owns the qualified-tool-name grammar: backend + "__" + tool. Ported from the reference tree (internal/namespace) — the separator constraints it encodes were learned against real clients and are kept verbatim.
Index ¶
Constants ¶
const MaxNamespacedNameLength = 64
MaxNamespacedNameLength is the wire ceiling from the client regex above.
const Separator = "__"
Separator joins a backend namespace and a tool name into one wire-visible identifier ("github__search_repos"). Constraints:
- Every character must be valid inside an MCP tool `name` field — clients (notably Claude Desktop's connector validation) enforce ^[a-zA-Z0-9_-]{1,64}$ on the composed name. "::" uses ':' which is outside that charset; "." and "/" are likewise rejected by strict clients.
- The only wire-legal characters are also legitimately used inside backend namespaces and tool names ("openai_docs", "deepwiki- knowledge"), so no single character is an unambiguous delimiter — the two-character "__" keeps the reserved-separator property.
Variables ¶
var ErrNameCharset = errors.New("name contains characters outside the MCP client-compatible charset")
ErrNameCharset distinguishes "this upstream name has a wire-illegal character" — a per-tool skip, never a whole-backend failure.
var ErrNameTooLong = errors.New("namespaced name exceeds the MCP client-compatible length ceiling")
ErrNameTooLong distinguishes "this one combination is too long" from malformed names — match with errors.Is, never on the error string.
Functions ¶
func ValidateNamespace ¶
Types ¶
This section is empty.