with-tools

command
v2.8.0-dev.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 28, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

README

with-tools — custom tool + MCP servers + skills

What this shows

An agent composed from the three tool sources a real embedding uses:

  1. a custom function tool (add, defined inline with ADK's functiontool.New),
  2. MCP servers loaded from .agents/mcp.json in the working directory (if present), and
  3. SKILL.md skills from .agents/skills/ (if any).

The agent is asked "What is 17 + 25?" and calls the add tool; the function-call name prints to stderr, the streamed answer to stdout.

Run it

Needs real Anthropic credentials (the example pins provider=anthropic):

ANTHROPIC_API_KEY=... go run ./examples/with-tools

MCP + skills loading is best-effort — with no .agents/ directory in your cwd it just logs and continues.

Key APIs

  • functiontool.Newgoogle.golang.org/adk/tool/functiontool
  • agent.WithTools / agent.WithToolsetsgithub.com/go-steer/core-agent/v2/pkg/agent
  • mcp.Buildgithub.com/go-steer/core-agent/v2/pkg/mcp
  • skills.Loadgithub.com/go-steer/core-agent/v2/pkg/skills
  • permissions.FromConfiggithub.com/go-steer/core-agent/v2/pkg/permissions

What you should see

→ add
The sum of 17 and 25 is 42.

(the → add line is the model's function call, printed to stderr).

Next

Documentation

Overview

Example: an agent with one custom tool, MCP servers loaded from .agents/mcp.json (if present), and SKILL.md skills from .agents/skills/ (if any).

ANTHROPIC_API_KEY=... go run ./examples/with-tools

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL