refactor(mcpserver): update tool IDs from string UUIDs to integers
Some checks failed
CI / build-and-test (push) Failing after -31m3s

This commit is contained in:
2026-05-03 17:26:41 +02:00
parent a8214aaa8b
commit d6bf0b20d0
3 changed files with 23 additions and 12 deletions

View File

@@ -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"} tool := &mcp.Tool{Name: "list_thoughts"}
if err := setToolSchemas[tools.ListInput, tools.ListOutput](tool); err != nil { if err := setToolSchemas[tools.ListInput, tools.ListOutput](tool); err != nil {
@@ -55,11 +55,8 @@ func TestSetToolSchemasUsesStringUUIDsInListOutput(t *testing.T) {
if idSchema == nil { if idSchema == nil {
t.Fatal("missing id schema") t.Fatal("missing id schema")
} }
if idSchema.Type != "string" { if idSchema.Type != "integer" {
t.Fatalf("id schema type = %q, want %q", idSchema.Type, "string") t.Fatalf("id schema type = %q, want %q", idSchema.Type, "integer")
}
if idSchema.Format != "uuid" {
t.Fatalf("id schema format = %q, want %q", idSchema.Format, "uuid")
} }
} }

View File

@@ -30,52 +30,63 @@ func TestNewListsAllRegisteredTools(t *testing.T) {
want := []string{ want := []string{
"add_guardrail", "add_guardrail",
"add_learning", "add_learning",
"add_maintenance_task", "add_plan_dependency",
"add_plan_guardrail",
"add_plan_skill",
"add_project_guardrail", "add_project_guardrail",
"add_project_skill", "add_project_skill",
"add_related_plan",
"add_skill", "add_skill",
"annotate_tool", "annotate_tool",
"archive_thought", "archive_thought",
"backfill_embeddings", "backfill_embeddings",
"capture_thought", "capture_thought",
"create_plan",
"create_project", "create_project",
"delete_chat_history", "delete_chat_history",
"delete_plan",
"delete_thought", "delete_thought",
"describe_tools", "describe_tools",
"get_active_project", "get_active_project",
"get_chat_history", "get_chat_history",
"get_learning", "get_learning",
"get_plan",
"get_project_context", "get_project_context",
"get_thought", "get_thought",
"get_upcoming_maintenance",
"get_version_info", "get_version_info",
"link_thoughts", "link_thoughts",
"list_chat_histories", "list_chat_histories",
"list_files", "list_files",
"list_guardrails", "list_guardrails",
"list_learnings", "list_learnings",
"list_plan_guardrails",
"list_plan_skills",
"list_plans",
"list_project_guardrails", "list_project_guardrails",
"list_project_skills", "list_project_skills",
"list_projects", "list_projects",
"list_skills", "list_skills",
"list_thoughts", "list_thoughts",
"load_file", "load_file",
"log_maintenance",
"recall_context", "recall_context",
"related_thoughts", "related_thoughts",
"remove_guardrail", "remove_guardrail",
"remove_plan_dependency",
"remove_plan_guardrail",
"remove_plan_skill",
"remove_project_guardrail", "remove_project_guardrail",
"remove_project_skill", "remove_project_skill",
"remove_related_plan",
"remove_skill", "remove_skill",
"reparse_thought_metadata", "reparse_thought_metadata",
"retry_failed_metadata", "retry_failed_metadata",
"save_chat_history", "save_chat_history",
"save_file", "save_file",
"search_maintenance_history",
"search_thoughts", "search_thoughts",
"set_active_project", "set_active_project",
"summarize_thoughts", "summarize_thoughts",
"thought_stats", "thought_stats",
"update_plan",
"update_thought", "update_thought",
"upload_file", "upload_file",
} }

View File

@@ -207,7 +207,10 @@ func streamableTestToolSet() ToolSet {
Backfill: new(tools.BackfillTool), Backfill: new(tools.BackfillTool),
Reparse: new(tools.ReparseMetadataTool), Reparse: new(tools.ReparseMetadataTool),
RetryMetadata: new(tools.RetryEnrichmentTool), RetryMetadata: new(tools.RetryEnrichmentTool),
//Maintenance: new(tools.MaintenanceTool),
Skills: new(tools.SkillsTool), Skills: new(tools.SkillsTool),
ChatHistory: new(tools.ChatHistoryTool),
Describe: new(tools.DescribeTool),
Learnings: new(tools.LearningsTool),
Plans: new(tools.PlansTool),
} }
} }