refactor(mcpserver): update tool IDs from string UUIDs to integers
Some checks failed
CI / build-and-test (push) Failing after -31m3s
Some checks failed
CI / build-and-test (push) Failing after -31m3s
This commit is contained in:
@@ -31,7 +31,7 @@ func TestSetToolSchemasAddsEmptyPropertiesForNoArgInput(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestSetToolSchemasUsesStringUUIDsInListOutput(t *testing.T) {
|
||||
func TestSetToolSchemasUsesIntegerIDsInListOutput(t *testing.T) {
|
||||
tool := &mcp.Tool{Name: "list_thoughts"}
|
||||
|
||||
if err := setToolSchemas[tools.ListInput, tools.ListOutput](tool); err != nil {
|
||||
@@ -55,11 +55,8 @@ func TestSetToolSchemasUsesStringUUIDsInListOutput(t *testing.T) {
|
||||
if idSchema == nil {
|
||||
t.Fatal("missing id schema")
|
||||
}
|
||||
if idSchema.Type != "string" {
|
||||
t.Fatalf("id schema type = %q, want %q", idSchema.Type, "string")
|
||||
}
|
||||
if idSchema.Format != "uuid" {
|
||||
t.Fatalf("id schema format = %q, want %q", idSchema.Format, "uuid")
|
||||
if idSchema.Type != "integer" {
|
||||
t.Fatalf("id schema type = %q, want %q", idSchema.Type, "integer")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -30,52 +30,63 @@ func TestNewListsAllRegisteredTools(t *testing.T) {
|
||||
want := []string{
|
||||
"add_guardrail",
|
||||
"add_learning",
|
||||
"add_maintenance_task",
|
||||
"add_plan_dependency",
|
||||
"add_plan_guardrail",
|
||||
"add_plan_skill",
|
||||
"add_project_guardrail",
|
||||
"add_project_skill",
|
||||
"add_related_plan",
|
||||
"add_skill",
|
||||
"annotate_tool",
|
||||
"archive_thought",
|
||||
"backfill_embeddings",
|
||||
"capture_thought",
|
||||
"create_plan",
|
||||
"create_project",
|
||||
"delete_chat_history",
|
||||
"delete_plan",
|
||||
"delete_thought",
|
||||
"describe_tools",
|
||||
"get_active_project",
|
||||
"get_chat_history",
|
||||
"get_learning",
|
||||
"get_plan",
|
||||
"get_project_context",
|
||||
"get_thought",
|
||||
"get_upcoming_maintenance",
|
||||
"get_version_info",
|
||||
"link_thoughts",
|
||||
"list_chat_histories",
|
||||
"list_files",
|
||||
"list_guardrails",
|
||||
"list_learnings",
|
||||
"list_plan_guardrails",
|
||||
"list_plan_skills",
|
||||
"list_plans",
|
||||
"list_project_guardrails",
|
||||
"list_project_skills",
|
||||
"list_projects",
|
||||
"list_skills",
|
||||
"list_thoughts",
|
||||
"load_file",
|
||||
"log_maintenance",
|
||||
"recall_context",
|
||||
"related_thoughts",
|
||||
"remove_guardrail",
|
||||
"remove_plan_dependency",
|
||||
"remove_plan_guardrail",
|
||||
"remove_plan_skill",
|
||||
"remove_project_guardrail",
|
||||
"remove_project_skill",
|
||||
"remove_related_plan",
|
||||
"remove_skill",
|
||||
"reparse_thought_metadata",
|
||||
"retry_failed_metadata",
|
||||
"save_chat_history",
|
||||
"save_file",
|
||||
"search_maintenance_history",
|
||||
"search_thoughts",
|
||||
"set_active_project",
|
||||
"summarize_thoughts",
|
||||
"thought_stats",
|
||||
"update_plan",
|
||||
"update_thought",
|
||||
"upload_file",
|
||||
}
|
||||
|
||||
@@ -207,7 +207,10 @@ func streamableTestToolSet() ToolSet {
|
||||
Backfill: new(tools.BackfillTool),
|
||||
Reparse: new(tools.ReparseMetadataTool),
|
||||
RetryMetadata: new(tools.RetryEnrichmentTool),
|
||||
//Maintenance: new(tools.MaintenanceTool),
|
||||
Skills: new(tools.SkillsTool),
|
||||
ChatHistory: new(tools.ChatHistoryTool),
|
||||
Describe: new(tools.DescribeTool),
|
||||
Learnings: new(tools.LearningsTool),
|
||||
Plans: new(tools.PlansTool),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user