namespace

package
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 9, 2026 License: MIT Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

View Source
const MaxNamespacedNameLength = 64

MaxNamespacedNameLength is the wire ceiling from the client regex above.

View Source
const Separator = "__"

Separator joins a backend namespace and a tool name into one wire-visible identifier ("github__search_repos"). Constraints:

  1. 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.
  2. 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

View Source
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.

View Source
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 Join

func Join(namespace string, name string) (string, error)

func Split

func Split(namespacedName string) (string, string, error)

func ValidateNamespace

func ValidateNamespace(value string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL