Table of Contents

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

errorMessage string

The error message

toolName string

Name of the MCP tool

context object

Optional additional context

Returns

string

JSON string with error information