source

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package source defines how operations are discovered. A Source is the only thing the engine consumes: anything that can produce []ir.Operation — an OpenAPI document, a live Gin router, a hand-written list — is a valid Source.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Func

type Func func(ctx context.Context) ([]ir.Operation, error)

Func adapts a plain function into a Source.

func (Func) Operations

func (f Func) Operations(ctx context.Context) ([]ir.Operation, error)

type Source

type Source interface {
	Operations(ctx context.Context) ([]ir.Operation, error)
}

Source produces the set of operations to expose as MCP tools.

func Static

func Static(ops ...ir.Operation) Source

Static returns a Source that always yields the given operations. Useful for tests and for manually-curated tool sets.

Directories

Path Synopsis
Package openapi turns an OpenAPI 3 document into ir.Operations.
Package openapi turns an OpenAPI 3 document into ir.Operations.
Package route holds the shared logic every framework adapter uses to turn a (method, path) route into an ir.Operation.
Package route holds the shared logic every framework adapter uses to turn a (method, path) route into an ir.Operation.
Package swaggo turns a swaggo-generated Swagger (OpenAPI 2.0) document into an api2mcp Source.
Package swaggo turns a swaggo-generated Swagger (OpenAPI 2.0) document into an api2mcp Source.

Jump to

Keyboard shortcuts

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