Type definitions for MCP protocol objects and DataGrout extensions.
Summary
Functions
Extract DataGrout metadata from a tool-call result map.
Parse a raw map into a Byok struct.
Parse a raw map into a CreditEstimate struct.
Parse a raw map into a DiscoverResult struct.
Parse a raw map into a DiscoveredTool struct.
Parse a raw map into a GuideOption struct.
Parse a raw map into a GuideState struct.
Parse a raw map into a Prompt struct.
Parse a raw map into a PromptMessage struct.
Parse a raw map into a Receipt struct.
Parse a raw map into a Resource struct.
Parse a raw map into a ResourceContent struct.
Parse a raw map into a Tool struct.
Parse _meta / _datagrout from a tool result into a ToolMeta struct.
Functions
@spec extract_meta(map()) :: DatagroutConduit.Types.ToolMeta.t() | nil
Extract DataGrout metadata from a tool-call result map.
Checks sources in priority order:
result["_meta"]["datagrout"]— rich formatresult["_datagrout"]/result["_meta"]— legacyresult["_dg"]— compact inline (synthesized)
Returns nil when no metadata is found.
@spec parse_byok(map()) :: DatagroutConduit.Types.Byok.t()
Parse a raw map into a Byok struct.
@spec parse_credit_estimate(map()) :: DatagroutConduit.Types.CreditEstimate.t()
Parse a raw map into a CreditEstimate struct.
@spec parse_discover_result(map()) :: DatagroutConduit.Types.DiscoverResult.t()
Parse a raw map into a DiscoverResult struct.
@spec parse_discovered_tool(map()) :: DatagroutConduit.Types.DiscoveredTool.t()
Parse a raw map into a DiscoveredTool struct.
@spec parse_guide_option(map()) :: DatagroutConduit.Types.GuideOption.t()
Parse a raw map into a GuideOption struct.
@spec parse_guide_state(map()) :: DatagroutConduit.Types.GuideState.t()
Parse a raw map into a GuideState struct.
@spec parse_prompt(map()) :: DatagroutConduit.Types.Prompt.t()
Parse a raw map into a Prompt struct.
@spec parse_prompt_message(map()) :: DatagroutConduit.Types.PromptMessage.t()
Parse a raw map into a PromptMessage struct.
@spec parse_receipt(map()) :: DatagroutConduit.Types.Receipt.t()
Parse a raw map into a Receipt struct.
@spec parse_resource(map()) :: DatagroutConduit.Types.Resource.t()
Parse a raw map into a Resource struct.
@spec parse_resource_content(map()) :: DatagroutConduit.Types.ResourceContent.t()
Parse a raw map into a ResourceContent struct.
@spec parse_tool(map()) :: DatagroutConduit.Types.Tool.t()
Parse a raw map into a Tool struct.
@spec parse_tool_meta(map()) :: DatagroutConduit.Types.ToolMeta.t()
Parse _meta / _datagrout from a tool result into a ToolMeta struct.