Documentation
¶
Overview ¶
Package render produces text renderings of tool results for MCP clients.
Index ¶
Constants ¶
const ( FormatMarkdown = "markdown" FormatJSON = "json" )
Text content render formats (issue #669). Markdown is the historical default; JSON renders the same DTO carried in structuredContent as compact JSON so text-only MCP consumers get a machine-readable payload.
Variables ¶
This section is empty.
Functions ¶
func IsLegalFormat ¶ added in v0.10.542
IsLegalFormat reports whether the supplied format name is supported. The empty string is legal and means "use the default".
func JSONValue ¶ added in v0.10.542
JSONValue renders any value as compact JSON for text content. Row sets pass through UnwrapRows first so database/sql nullable wrappers serialise as their scalar payloads rather than {Valid, ...} envelopes.
func RenderTable ¶
RenderTable renders a uniform multi-row result set as a markdown table. Column order is stable: the union of keys across all rows, sorted alphabetically.
Types ¶
This section is empty.