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.