patchmcp

package
v1.113.1 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 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