Documentation
¶
Index ¶
- func CallTool(cmd *cobra.Command, tool string, args map[string]any, view any) (json.RawMessage, error)
- func CallToolWithImages(cmd *cobra.Command, tool string, args map[string]any, view any) (json.RawMessage, [][]byte, error)
- func ClientFromCmd(cmd *cobra.Command) dune.DuneClient
- func FileFlag(cmd *cobra.Command, name string) ([]byte, error)
- func JSONFlag(cmd *cobra.Command, name string, v any) error
- func MCPFromCmd(cmd *cobra.Command) dunemcp.Caller
- func PlanHint(err error) string
- func SetClient(cmd *cobra.Command, client dune.DuneClient)
- func SetMCP(cmd *cobra.Command, c dunemcp.Caller)
- func SetStartTime(cmd *cobra.Command, t time.Time)
- func SetTracker(cmd *cobra.Command, t *tracking.Tracker)
- func StartTimeFromCmd(cmd *cobra.Command) time.Time
- func ToolArgs(cmd *cobra.Command, names map[string]string) map[string]any
- func TrackerFromCmd(cmd *cobra.Command) *tracking.Tracker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CallTool ¶ added in v0.1.21
func CallTool(cmd *cobra.Command, tool string, args map[string]any, view any) (json.RawMessage, error)
CallTool calls a Dune MCP tool and, when view is not nil, decodes the result into it. It returns the result as the tool sent it, for JSON output.
func CallToolWithImages ¶ added in v0.1.24
func CallToolWithImages(cmd *cobra.Command, tool string, args map[string]any, view any) (json.RawMessage, [][]byte, error)
CallToolWithImages calls a Dune MCP tool like CallTool and also returns the images the tool sent.
func ClientFromCmd ¶
func ClientFromCmd(cmd *cobra.Command) dune.DuneClient
ClientFromCmd extracts the DuneClient stored in the command's context.
func FileFlag ¶ added in v0.1.21
FileFlag returns the value of a string flag. A value that starts with @ names a file to read the value from, and @- reads standard input.
func JSONFlag ¶ added in v0.1.21
JSONFlag decodes a flag that holds JSON, read as FileFlag reads it.
func MCPFromCmd ¶ added in v0.1.21
MCPFromCmd extracts the Dune MCP caller stored in the command's context.
func PlanHint ¶ added in v0.1.24
PlanHint returns the next steps for an error caused by the account's plan: running out of credits, reaching the extra credits limit, a rate limit, or unpaid invoices. It returns "" for any other error.
Unlike the Dune MCP server, which plugin directories keep from promoting upgrades, the CLI links straight to the plan settings and pricing pages.
func SetClient ¶
func SetClient(cmd *cobra.Command, client dune.DuneClient)
SetClient stores a DuneClient in the command's context.
func SetStartTime ¶ added in v0.1.1
SetStartTime stores the command start time in the command's context.
func SetTracker ¶ added in v0.1.1
SetTracker stores a Tracker in the command's context.
func StartTimeFromCmd ¶ added in v0.1.1
StartTimeFromCmd extracts the command start time from the command's context.
Types ¶
This section is empty.