Files
kandev/apps/backend/internal/mcp/server/spawn_session_tool_test.go
T
2026-08-12 16:52:19 +01:00

25 lines
909 B
Go

package mcp
import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestSpawnSessionToolDescribesEffectiveAgentProfile(t *testing.T) {
s := newTaskModeServer(t, &testBackend{}, "task-current")
tool, ok := s.mcpServer.ListTools()["spawn_session_kandev"]
require.True(t, ok, "spawn_session_kandev must be registered in task mode")
description := tool.Tool.Description
assert.Contains(t, description, "agent_profile_id")
assert.Contains(t, description, "effective agent profile")
assert.Contains(t, description, "Returns {task_id, session_id, state, agent_profile_id}")
profileProperty, ok := toolInputProperties(t, s, "spawn_session_kandev")["agent_profile_id"].(map[string]interface{})
require.True(t, ok, "agent_profile_id input must be described")
assert.Contains(t, profileProperty["description"], "workflow launch profile may override it")
}