API Reference — Go
Module github.com/muthuishere/toolnexus/golang (Go 1.23). See the
combined API Reference for every symbol shown in six-language synced tabs.
Toolkit
Section titled “Toolkit”CreateToolkit(ctx context.Context, opts Options) (*Toolkit, error)Optionsfields:McpConfig,SkillsDir,Skills,SkillProvider,SkillsFilter,SkillSampleLimit,Builtins,Agents,ExtraTools,WaitFor.- Equivalents:
createToolkit(js) ·create_toolkit(py) ·Toolkit.create(java) ·Toolkit.CreateAsync(c#) ·Toolnexus.create_toolkit(elixir).
Skills
Section titled “Skills”LoadSkills(dirs ...string) *SkillSource— back-compat variadic.LoadSkillsWith(opts LoadSkillsOptions) *SkillSourceListSkills(opts LoadSkillsOptions) *SkillInventory—.Skills,.Skipped(SkillSkip.Reason; constantsSkipMissingName,SkipMalformed,SkipDuplicateName,SkipUnreadable).SkillDef{ Name, Description, Content, Resources, Base }LoadSkillsOptions{ Dirs, Skills, Filter, SampleLimit }SkillProvider func(context.Context) ([]SkillDef, error)(onOptions).- Equivalents:
loadSkills/listSkills(js) ·load_skills/list_skills(py) ·SkillSource.loadWith/listSkills(java) ·SkillSource.LoadWith/ListSkills(c#) ·Toolnexus.Skill.load/Toolnexus.Skill.list(elixir).
MCP · Adapters · Client
Section titled “MCP · Adapters · Client”LoadMcp(config any) (*McpSource, error)tk.ToOpenAI()·tk.ToAnthropic()·tk.ToGemini()CreateClient(opts ClientOptions) *Client→client.Ask(ctx, prompt, tk, id).
Tools you build — native, HTTP, built-ins
Section titled “Tools you build — native, HTTP, built-ins”NativeTool(name, description, schema, fn)·NativeToolReflect[T](name, description, fn)— schema from struct json tags.HTTPTool(opts HTTPToolOptions)—{ Name, Description, Method, URL, Headers, Query, Body, ResultMode, Timeout };Timeoutms (0 ⇒ 30000).Builtinstoggle → ten built-ins:bash · read · write · edit · grep · glob · webfetch · question · apply_patch · todowrite.- Equivalents:
defineTool/httpTool(js) ·define_tool/http_tool(py) ·NativeTool.of/HttpTool.of(java) ·NativeTool.Of/HttpTool.Of(c#) ·Toolnexus.Native.define_tool/Toolnexus.Http.tool(elixir).
Sub-agents & teams
Section titled “Sub-agents & teams”agents.New(name, agents.Spec{Does, Tools, Soul, SoulFile, Team, Budget, Model, WaitFor}) *Agent.(a *Agent) Run(agents.Options{LLM: ...}, prompt) (TaskResult, *Runtime)—.Status,.Text,.TotalTokens.(a *Agent) AsTool(agents.Options) tn.Tool·agents.ComposeSoul(dir) (soul, found).- Equivalents:
agents.agent/.run/.asTool/composeSoul(js) ·agent(py) ·Agents.agent(java/elixir) ·new Agent(c#).
A2A — serve & remote agents
Section titled “A2A — serve & remote agents”(tk *Toolkit) Serve(addr, ServeOptions{Client, A2A: *A2AConfig, OnTask, MCP, OnCall}) (*ServeHandle, error).Agent{Card, Headers, Timeout, PollEvery}+Options{Agents: []Agent}/tk.AddAgent(ctx, cardURL, opts).- Equivalents:
tk.serve/tk.addAgent(js) ·serve/add_agent(py) ·serve/addAgent(java) ·ServeAsync/AddAgentAsync(c#) ·Toolkit.serve/Toolkit.add_agent(elixir).
Suspension & the human loop
Section titled “Suspension & the human loop”WaitForfield onOptions—func(Request) (Answer, error).Request{ID, Kind, Prompt, URL, Data, ExpiresAt}·Answer{ID, Ok, Data, Reason}.Pending(req Request) ToolResult·AuthRequired(url, prompt) ToolResult·PendingOf(result) *Request.- Equivalents:
waitFor/pending/authRequired/pendingOf(js) ·wait_for/pending(py) ·waitFor/ToolResult.pending(java) ·WithWaitFor/ToolResult.Pending(c#) ·wait_for/ToolResult.pending?(elixir).