mcptools

package
v0.89.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package mcptools serves the framework's embedded documentation over MCP: framework_docs_list, framework_docs_get and framework_docs_search, so an agent connected to a running app can answer "how do I use hooks" without leaving the session.

The package is a host opt-in beside framework.WithMCPIntrospection, handed to the framework through the generic registrar option:

framework.NewApp(
	framework.WithMCP(),
	framework.WithMCPIntrospection(),
	framework.WithMCPTools(mcptools.Register),
)

It lives under framework/docs rather than inside framework so that framework itself never imports the embedded markdown corpus, and it imports core/mcp rather than framework so the facade stays above it (framework/layering_test.go pins that direction). The repo's affected-package walk marks an embedded asset as a change to its owning package, so with the import in framework every docs edit widened the test set to the whole tree; with the edge here a docs edit affects framework/docs, this package and the hosts that import it. The tools read framework/docs at call time, so they always describe the framework version the binary was built against.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(srv *mcp.Server) error

Register adds the three framework_docs_* MCP tools to srv. The tools are read-only and reveal nothing about the app itself, only the framework's own documentation, so they are safe beside a public /mcp. Hand it to framework.WithMCPTools; a name collision with a host-registered tool fails the boot the way every other registrar error does.

Types

This section is empty.

Jump to

Keyboard shortcuts

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