Wymcp. Hint
(Wymcp v0.1.1)
View Source
Struct for follow-up action suggestions in MCP tool responses.
Every hint represents a concrete next action the LLM can take. The struct
enforces required fields at construction time and validates that tool and
action are strings (matching the JSON wire format). A hint serializes to
a flat JSON map via the module's JSON.Encoder implementation, and is
consumed by Wymcp.Tool, which injects hints returned from the
Wymcp.Tool.hints/2 callback into tool responses.
Fields
tool(required) — tool name, e.g."tasks"action(required) — action name, e.g."get"description(required) — human-readable explanation of why this action is relevantexample(optional) — exampledatapayload, e.g.%{data: %{id: "..."}}
Usage
Hint.new(tool: "tasks", action: "get", description: "View the task", example: %{data: %{id: id}})