# Agent Tool Access Examples
#
# Demonstrates different ways to configure which tools agents can access.
# Supports both camelCase (mcpServers) and snake_case (mcp_servers) naming.
#
# There are THREE ways to grant tool access to agents:
#
# 1. mcp_servers only - Agent gets ALL tools from specified servers
#    mcp_servers = ["shell", "filesystem"]
#    # Gets every tool from shell and filesystem servers
#
# 2. tools only - Agent gets tools matching patterns from ALL servers
#    tools = ["shell_*", "*_read"]
#    # Gets shell_* tools AND any *_read tools from any server
#
# 3. mcp_servers + tools - Agent gets filtered tools from specific servers
#    mcp_servers = ["filesystem"]
#    tools = ["*_read*", "*_list*"]
#    # Gets only read/list tools, but ONLY from the filesystem server
#
# Usage:
#   eunice --list-tools           # See all tools and agent access
#   eunice --list-agents          # See configured agents
#   eunice "list files"           # Root delegates appropriately

# MCP Servers - both naming conventions work
[mcp_servers.shell]
command = "mcpz"
args = ["server", "shell"]

[mcp_servers.filesystem]
command = "mcpz"
args = ["server", "filesystem"]

# ============================================================================
# EXAMPLE 1: Server-level access (mcp_servers only)
# Agent gets ALL tools from specified servers
# ============================================================================
[agents.shell_expert]
prompt = """You are a shell expert. You have full access to shell commands.
Execute commands safely and explain what you're doing."""
mcp_servers = ["shell"]      # Gets ALL shell tools
can_invoke = []

# ============================================================================
# EXAMPLE 2: Pattern-based access (tools only)
# Agent gets tools matching patterns from ALL servers
# ============================================================================
[agents.reader]
prompt = """You are a read-only agent. You can read files and list directories,
but you cannot modify anything. Use your tools to explore the filesystem."""
tools = ["*_read*", "*_list*", "*_tree*", "*_search*", "*_info*"]
can_invoke = []

# ============================================================================
# EXAMPLE 3: Combined access (mcp_servers + tools)
# Agent gets filtered tools from specific servers only
# ============================================================================
[agents.fs_writer]
prompt = """You are a filesystem writer. You can ONLY write and edit files
from the filesystem server. You cannot run shell commands or read files."""
mcp_servers = ["filesystem"]
tools = ["*_write*", "*_edit*", "*_create*", "*_move*"]
can_invoke = []

# ============================================================================
# ROOT: Coordinator that delegates to specialists
# ============================================================================
[agents.root]
prompt = """You are a task coordinator. Delegate to the appropriate specialist:
- invoke_shell_expert: For running shell commands
- invoke_reader: For reading files and exploring directories
- invoke_fs_writer: For writing or editing files

Choose the right agent based on the task. You have no direct tool access."""
tools = []
can_invoke = ["shell_expert", "reader", "fs_writer"]
