mcp: remove edit permission from recipe read output

Amolith created

Change summary

internal/mcp/server.go      | 23 ++++++++++-------------
internal/mcp/server_test.go |  8 ++------
2 files changed, 12 insertions(+), 19 deletions(-)

Detailed changes

internal/mcp/server.go 🔗

@@ -134,12 +134,11 @@ func (s *Server) callRecipeReadTool(ctx context.Context, rawRecipeID string) (*s
 	}
 
 	recipe := RecipeDetail{
-		ID:             recipeID,
-		Title:          metadata.Title,
-		Owner:          metadata.Owner,
-		EditPermission: metadata.EditPermission,
-		Content:        content.Content,
-		Portions:       content.Portions,
+		ID:       recipeID,
+		Title:    metadata.Title,
+		Owner:    metadata.Owner,
+		Content:  content.Content,
+		Portions: content.Portions,
 	}
 	output := ReadOutput{Recipe: &recipe}
 
@@ -998,7 +997,6 @@ func formatRecipe(recipe RecipeDetail) string {
 		builder.WriteString(recipe.Owner)
 		builder.WriteByte('\n')
 	}
-	fmt.Fprintf(&builder, "Edit permission: %t\n", recipe.EditPermission)
 	fmt.Fprintf(&builder, "Portions: %s\n", formatPortions(recipe.Portions))
 
 	content := strings.TrimSpace(recipe.Content)
@@ -1103,12 +1101,11 @@ type RecipeSummary struct {
 
 // RecipeDetail is the MCP-safe single recipe output.
 type RecipeDetail struct {
-	ID             string  `json:"id"`
-	Title          string  `json:"title"`
-	Owner          string  `json:"owner"`
-	EditPermission bool    `json:"edit_permission"`
-	Content        string  `json:"content"`
-	Portions       float64 `json:"portions"`
+	ID       string  `json:"id"`
+	Title    string  `json:"title"`
+	Owner    string  `json:"owner"`
+	Content  string  `json:"content"`
+	Portions float64 `json:"portions"`
 }
 
 // PreviewRecipeTextArguments contains preview_recipe_text tool arguments.

internal/mcp/server_test.go 🔗

@@ -173,12 +173,8 @@ func requireSingleRecipeOutput(t *testing.T, output ReadOutput) {
 	if output.Recipe.ID != "recipe-1" || output.Recipe.Title != "Pasta" {
 		t.Fatalf("structured recipe identity = %#v, want recipe-1 Pasta", output.Recipe)
 	}
-	if output.Recipe.Owner != "returned-user" || !output.Recipe.EditPermission {
-		t.Fatalf(
-			"structured recipe owner/edit = %q/%v, want returned-user/true",
-			output.Recipe.Owner,
-			output.Recipe.EditPermission,
-		)
+	if output.Recipe.Owner != "returned-user" {
+		t.Fatalf("structured recipe owner = %q, want returned-user", output.Recipe.Owner)
 	}
 	if output.Recipe.Content != "# Pasta\n\n- 200g pasta\n\n1. Boil pasta." || output.Recipe.Portions != 1.5 {
 		t.Fatalf(