Skip to main content
Tools let an agent call deterministic business logic, external services, or runtime capabilities. VeADK Go supports ADK Go function tools and toolsets, plus Volcengine-oriented built-in tools.

Minimal Function Tool

Function tools are best for deterministic business actions such as calculation, internal lookups, or writing application data. The json and jsonschema tags on the argument struct help the model produce valid JSON arguments.
The handler receives an agent.Context. It can read AppName(), AgentName(), UserID(), SessionID(), and related runtime fields, which is useful for correlating tool calls with business requests. Web Search lets the agent search open web material. Link Reader is useful when the user provides URLs and the agent needs to read the main content from pages, PDFs, or video links.
Use builtin_tools.NewWebFetchTool(...) when you only need to fetch a specified page. For stronger scraping behavior, see NewWebScraperTool(...).

MCP Router Toolset

MCP Router is mounted as a Toolset. It is useful when tools are centrally managed by the platform and should be exposed to the agent without reimplementing each tool in application code.
Use an explicit MCP Router endpoint:
Or provide an AgentKit MCP Toolset ID and let VeADK Go resolve the endpoint and API key through AgentKit:
MCP_TOOLSET_ID is accepted as an alias for MCP_ROUTER_ID. Explicit url or api_key values override values resolved from the ID.

Run Code and Skills Sandbox

NewRunCodeSandboxTool creates the long-running run_code tool and delegates code execution to AgentKit Code Sandbox.
At runtime, provide the AgentKit tool ID. run_code first looks for the script-specific tool ID:
Skills Sandbox is for delegating a larger workflow to a remote Skill environment. Use execute_skills when the agent should wait for the final result; use invoke_skill plus poll_skill for non-blocking tasks.
Skills Sandbox usually needs:
If the agent also needs to read remote Skill instructions, combine it with skilltool.NewReadOnlySkillToolset(...) or skilltool.NewSkillToolset(...) and put the result in Toolsets.

Common Tool Types

Recommendations

  • Keep tool names stable and describe inputs, outputs, and side effects.
  • Add confirmation for writes, orders, approvals, or other irreversible actions.
  • Pass external credentials through environment variables, secrets, or runtime state.
  • Set reasonable timeouts for long-running tools and expose in-progress state in the caller or UI.
  • Return structured errors from external services so the model can decide whether to retry, switch tools, or ask the user for clarification.

Safety Boundaries for Side Effects

When a tool modifies an external system, submits an approval, sends a message, deletes resources, or spends money, do not rely only on the model’s judgment. Add confirmation, authorization, and auditing in the business layer.
Last modified on October 20, 2026