multica-ai/multica · error

name is required

Error message

name is required

What it means

Validation guard in validateWorkspaceMcpServerName: the MCP server name was empty. The name is the mount path the runtime serves the MCP server under and collides with an agent's own config, so it follows the same rule as the agent settings dialog; empty names cannot be mounted.

Solutions

  1. Provide a non-empty name for the MCP server.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at server/internal/handler/workspace_mcp.go:183 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of multica-ai/multica@2c0912b6ec (2026-08-15). Data as JSON: /api/errors/d9d229076e2c8681. Report an issue: GitHub.

Appendix: source

Thrown at server/internal/handler/workspace_mcp.go:183

	}
	var entry map[string]json.RawMessage
	if err := json.Unmarshal(trimmed, &entry); err != nil {
		// Never wrap: the underlying error can echo fragments of an entry that
		// routinely embeds API tokens.
		return errors.New("config must be a JSON object")
	}
	if len(entry) == 0 {
		return errors.New("config must not be empty")
	}
	return nil
}

// validateWorkspaceMcpServerName checks a server name. The name is what the
// runtime mounts the server under and what an agent's own config collides
// with, so it follows the same rule the agent settings dialog enforces.
func validateWorkspaceMcpServerName(name string) error {
	if name == "" {
		return errors.New("name is required")
	}
	for _, r := range name {
		switch {
		case r >= 'a' && r <= 'z', r >= 'A' && r <= 'Z', r >= '0' && r <= '9', r == '-', r == '_':
		default:
			return errors.New("name may only contain letters, digits, hyphens, and underscores")
		}
	}
	return nil
}

View on GitHub (pinned to 2c0912b6ec)