Method FormatError
- Namespace
- GrindFest.GameMaster.Helpers
- Assembly
- GrindFest.dll
FormatError(string, string, object)
Formats a simple error message into JSON format. Use this for validation errors or expected error conditions.
public static string FormatError(string errorMessage, string toolName, object context = null)
Parameters
errorMessagestringThe error message
toolNamestringName of the MCP tool
contextobjectOptional additional context
Returns
- string
JSON string with error information