Help us shape the future of Go! Take the 2026 Go Developer Survey

patchmcp

package
v1.130.4 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package patchmcp renders textpatch failures as MCP tool results carrying the platform's error contract.

It is the one adapter between the pure-text edit engine and the protocol, so a PATCH_AMBIGUOUS from manage_asset and one from manage_prompt are the same envelope with the same code and the same corrective hint. pkg/textpatch stays free of MCP; every tool that adopts the grammar routes its errors here.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrorResult

func ErrorResult(err error) *mcp.CallToolResult

ErrorResult converts an error from pkg/textpatch into a categorized tool result. A textpatch.Error keeps its stable PATCH_* code and hint; any other error is reported as a generic tool error so a result is never an opaque string.

Types

This section is empty.

Jump to

Keyboard shortcuts

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