trait NormalizesMcpResult

Methods

string
errorMessage(string $text)

Format an MCP error payload into tool output.

string
json(array $content)

Encode structured MCP content as JSON.

Details

at line 12
protected string errorMessage(string $text)

Format an MCP error payload into tool output.

Parameters

string $text

Return Value

string

at line 24
protected string json(array $content)

Encode structured MCP content as JSON.

Parameters

array $content

Return Value

string