extension

package
v0.19.1 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: Apache-2.0 Imports: 0 Imported by: 2 modules, 6 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.

README

MCP Protocol Extensions

This package hosts optional/shared helpers that are not part of the formal Model Context Protocol specification but are useful for interoperable behaviors across clients/servers and tools.

Current extensions:

  • namespaces: ordinary namespace catalog tools, opaque namespace references, resource summaries, and optional generic snapshot pagination.
  • continuation: a reusable pagination/truncation hint (fields for hasMore, remaining/returned, nextRange/pageToken, mode, binary) that tools can attach to responses when content is clipped or paged.

Keeping extensions out of schema/ avoids conflating experimental/optional fields with the official MCP schema.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ByteRange

type ByteRange struct {
	Offset int `json:"offset,omitempty"`
	Length int `json:"length,omitempty"`
}

ByteRange specifies a half-open [Offset, Offset+Length) window.

type Continuation

type Continuation struct {
	// HasMore reports that more data is available beyond what was returned.
	HasMore bool `json:"hasMore,omitempty"`
	// Remaining is the estimated number of bytes (or units) not returned.
	Remaining int `json:"remaining,omitempty"`
	// Returned is the number of bytes (or units) included in this response.
	Returned int `json:"returned,omitempty"`
	// NextRange provides the next suggested byte/line window for continuation.
	NextRange *RangeHint `json:"nextRange,omitempty"`
	// PageToken is an opaque continuation token alternative to NextRange.
	PageToken string `json:"pageToken,omitempty"`
	// Mode optionally records the preview mode applied (e.g., head, tail).
	Mode string `json:"mode,omitempty"`
	// Binary indicates the returned content is a placeholder/preview for binary data.
	Binary bool `json:"binary,omitempty"`
}

Continuation describes a generic pagination/truncation hint that tools can attach to their responses. Presence of this object signals that additional data may be retrieved by following the provided range or page token.

type LineRange

type LineRange struct {
	Start int `json:"start,omitempty"`
	Count int `json:"count,omitempty"`
}

LineRange specifies a 1-based start line and count window.

type RangeHint

type RangeHint struct {
	Bytes *ByteRange `json:"bytes,omitempty"`
	Lines *LineRange `json:"lines,omitempty"`
}

RangeHint defines the next slice to fetch, expressed as bytes or lines.

Directories

Path Synopsis
Package namespaces defines optional catalog tools shared by MCP applications.
Package namespaces defines optional catalog tools shared by MCP applications.
Package skills validates Agent Skills metadata and builds SEP-2640 inventories.
Package skills validates Agent Skills metadata and builds SEP-2640 inventories.

Jump to

Keyboard shortcuts

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