catalog

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package catalog maps context files to MCP resource URIs and builds the immutable resource list returned by the server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AgentURI

func AgentURI() string

AgentURI returns the full URI for the assembled agent packet.

Returns:

  • string: agent resource URI

func FileForURI

func FileForURI(uri string) string

FileForURI returns the context file name for a resource URI or empty string if the URI is not a known file resource.

Parameters:

  • uri: full resource URI to look up

Returns:

  • string: context file name, or "" if unknown

func Init

func Init()

Init builds the URI-to-file lookup map. Must be called once before FileForURI is used (called from NewServer during bootstrap).

func ToList

func ToList() proto.ResourceListResult

ToList constructs the immutable resource list. Called once from NewServer.

Returns:

  • proto.ResourceListResult: all resources including the agent packet

func URI

func URI(name string) string

URI builds a resource URI from a name suffix.

Parameters:

  • name: resource name suffix (e.g., "tasks", "agent")

Returns:

  • string: full URI (e.g., "ctx://context/tasks")

Types

This section is empty.

Jump to

Keyboard shortcuts

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